Utility type that excludes undefined from a type.
undefined
Similar to NonNullable<T>, but only excludes undefined.
NonNullable<T>
Example:
type A = Defined<string | number | undefined>; // string | numbertype B = Defined<undefined>; // nevertype C = Defined<string | null>; // string | null Copy
type A = Defined<string | number | undefined>; // string | numbertype B = Defined<undefined>; // nevertype C = Defined<string | null>; // string | null
Utility type that excludes
undefinedfrom a type.Similar to
NonNullable<T>, but only excludesundefined.Example: