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