Type Alias IsNotNumber<T, $O>

IsNotNumber<T, $O>: $SpecialType<T, $MergeOptions<$O, {
    $else: NumberPlus.IsNotNumber.$<T, $O>;
    $then: $ResolveBranch<T, $O, [$Then]>;
}>>

🎭 predicate

Validate if T is not number nor number literals.

Type Parameters

type R = IsNotNumber<number> // false
type R = IsNotNumber<1> // false

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

🔢 customize

Filter to ensure T is not number nor number literals, otherwise returns never.

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

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

🔢 customize

Disable distribution of union types.

type R = IsNotNumber<number | 1> // boolean
type R = IsNotNumber<number | 1, { distributive: false }> // true

🔢 customize

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

type R = IsNotNumber<string, $SelectionBranch> // $Then
type R = IsNotNumber<number, $SelectionBranch> // $Else