Type Alias IsFalse<T, $O>

IsFalse<T, $O>: $SpecialType<T, $MergeOptions<$O, {
    $else: IsFalse.$<T, $O>;
    $then: $ResolveBranch<T, $O, [$Else]>;
}>>

🎭 predicate

Validate if T is false.

Type Parameters

type R = IsFalse<boolean> // boolean
type R = IsFalse<true> // false
type R = IsFalse<false> // true

type R = IsFalse<number> // false
type R = IsFalse<unknown> // false
type R = IsFalse<string | boolean> // boolean

🔢 customize

Filter to ensure T is false, otherwise returns never.

type R = IsFalse<boolean, { selection: 'filter' }> // false
type R = IsFalse<true, { selection: 'filter' }> // never
type R = IsFalse<false, { selection: 'filter' }> // false

type R = IsFalse<number, { selection: 'filter' }> // never
type R = IsFalse<unknown, { selection: 'filter' }> // never
type R = IsFalse<never, { selection: 'filter' }> // never
type R = IsFalse<string | boolean, { selection: 'filter' }> // false

🔢 customize:

Disable distribution of union types.

type R = IsFalse<false | 1> // boolean
type R = IsFalse<boolean | 1> // boolean
type R = IsFalse<boolean | 1, { distributive: false }> // false

🔢 customize

Use unique branch identifiers to allow precise processing of the result.

type R = IsFalse<false, $SelectionBranch> // $Then
type R = IsFalse<boolean, $SelectionBranch> // $Then | $Else
type R = IsFalse<string, $SelectionBranch> // $Else