Type Alias OptionalKeysOf<T>

OptionalKeysOf<T>: {
    [K in keyof T as undefined extends T[K]
        ? K
        : never]: T[K]
}

extract all optional fields from type T

Type Parameters

  • T