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.
🎭 predicate
Validate if
T
is not number literals.