type R = IsNotUndefined<undefined> // false
type R = IsNotUndefined<never> // true
type R = IsNotUndefined<unknown> // true
type R = IsNotUndefined<string | boolean> // true
🔢 customize
Filter to ensure T
is not undefined
, otherwise returns never
.
type R = IsNotUndefined<undefined, { selection: 'filter' }> // never
type R = IsNotUndefined<never, { selection: 'filter' }> // never
type R = IsNotUndefined<unknown, { selection: 'filter' }> // unknown
type R = IsNotUndefined<string | boolean, { selection: 'filter' }> // string | boolean
🔢 customize
Disable distribution of union types.
🎭 predicate
Validate if
T
is notundefined
.