Type Alias RequiredKeys<T>

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

Extract the keys of T which are required

Type Parameters

  • T