devtypes - v2.0.0
    Preparing search index...

    Type Alias RequiredKeys<T>

    RequiredKeys: keyof Omit<T, OptionalKeys<T>>

    Extract the keys of required properties.

    Type Parameters

    • T

      Object type to analyze

    Identifies properties that must be present and do not allow undefined.

    type Obj = { a: number; b?: string; c: number | undefined; d: boolean };
    type ReqKeys = RequiredKeys< Obj >; // 'a' | 'd'