Type alias RequiredKeys<T>

RequiredKeys<T>: {
    [K in keyof T]-?: {} extends Pick<T, K>
        ? never
        : K
}[keyof T]

pick all required properties from an object.

Type Parameters

  • T

Source