Type Alias IsNotUnknown<T, $O>

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

🎭 predicate

Validate if T is not exactly unknown.

Type Parameters

type R = IsNotUnknown<unknown> // false

type R = IsNotUnknown<number> // true
type R = IsNotUnknown<never> // true

🔢 customize

Filter to ensure T is not exactly unknown.

type R = IsNotUnknown<unknown, { selection: 'filter' }> // never

type R = IsNotUnknown<number, { selection: 'filter' }> // number
type R = IsNotUnknown<never, { selection: 'filter' }> // never

🔢 customize

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

type R = IsNotUnknown<unknown, $SelectionBranch> // $Else
type R = IsNotUnknown<string, $SelectionBranch> // $Then