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