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