Type Alias IsNotAny<T, $O>

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

🎭 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