type R = IsNotNull<null, { selection: 'filter' }> // never
type R = IsNotNull<never, { selection: 'filter' }> // never
type R = IsNotNull<unknown, { selection: 'filter' }> // unknown
type R = IsNotNull<string | boolean, { selection: 'filter' }> // string | boolean
🔢 customize
Disable distribution of union types.
🎭 predicate
Validate if
T
is notnull
.🔢 customize
Filter to ensure
T
is notnull
, otherwise returnsnever
.