Type Alias IsNotAny<T, $O>

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

🎭 predicate

Validate if T is not any.

Type Parameters

type R = IsNotAny<any> // false

type R = IsNotAny<never> // true
type R = IsNotAny<unknown> // true
type R = IsNotAny<string | boolean> // true

🔢 customize

Filter to ensure T is not any.

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

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

🔢 customize

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

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