type R = IsUndefined<undefined> // true
type R = IsUndefined<never> // false
type R = IsUndefined<unknown> // false
type R = IsUndefined<string | boolean> // false
type R = IsUndefined<string | undefined> // boolean
🔢 customize
Filter to ensure T
is undefined
, otherwise returns never
.
type R = IsUndefined<undefined, { selection: 'filter' }> // undefined
type R = IsUndefined<never, { selection: 'filter' }> // never
type R = IsUndefined<unknown, { selection: 'filter' }> // never
type R = IsUndefined<string | boolean, { selection: 'filter' }> // never
type R = IsUndefined<string | undefined> // undefined
🔢 customize:
Disable distribution of union types.
type R = IsUndefined<undefined | 1> // boolean
type R = IsUndefined<undefined | 1, { distributive: false }> // false
🔢 customize
Use unique branch identifiers to allow precise processing of the result.
🎭 predicate
Validate if
T
isundefined
.