Type Alias IsAny<T, $O>

IsAny<T, $O>: $SpecialType<T, {
    $any: $ResolveBranch<T, $O, [$Then]>;
    $else: $ResolveBranch<T, $O, [$Else]>;
    $never: $ResolveBranch<T, $O, [$Never, $Else]>;
    $unknown: $ResolveBranch<T, $O, [$Unknown, $Else]>;
}>

🎭 predicate

Validate if T is any.

Type Parameters

type R = IsAny<any> // true

type R = IsAny<never> // false
type R = IsAny<unknown> // false
type R = IsAny<string | boolean> // false

🔢 customize

Filter to ensure T is any.

type R = IsAny<any, { selection: 'filter' }> // any

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

🔢 customize

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

type R = IsAny<any, $SelectionBranch> // $Then
type R = IsAny<string, $SelectionBranch> // $Else