ts-type-forge
    Preparing search index...

    Type Alias RequiredKeys<R>

    RequiredKeys: Exclude<keyof R, OptionalKeys<R>>

    Extracts keys from a record R that are not explicitly marked as optional using the ? modifier. It calculates this by taking all keys of R and excluding the optional keys identified by OptionalKeys<R>.

    Type Parameters

    A union of keys that are required (not optional) in R.

    type K = RequiredKeys<{
    a?: 0; // optional
    b?: 0 | undefined; // optional
    c?: undefined; // optional
    d: 0; // required
    e: undefined; // required, value is undefined
    f: 0 | undefined; // required, value includes undefined
    }>; // 'd' | 'e' | 'f'