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