Type Alias IsNotNumberLiteral<T, $O>

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

🎭 predicate

Validate if T is not number literals.

Type Parameters

type R = IsNotNumberLiteral<number> // true
type R = IsNotNumberLiteral<1> // false

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

type R = IsNotNumberLiteral<string | 1> // boolean

🔢 customize

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

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

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

🔢 customize:

Disable distribution of union types.

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

🔢 customize

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

type R = IsNotNumberLiteral<1, $SelectionBranch> // $Else
type R = IsNotNumberLiteral<string, $SelectionBranch> // $Then