type R = IsNotString<string> // false
type R = IsNotString<'a'> // false
type R = IsNotString<never> // false
type R = IsNotString<unknown> // false
type R = IsNotString<string | boolean> // boolean
🔢 customize
Filter to ensure T
is not string
nor string
literals, otherwise returns never
.
type R = IsNotString<string, { selection: 'filter' }> // never
type R = IsNotString<'a', { selection: 'filter' }> // never
type R = IsNotString<never, { selection: 'filter' }> // never
type R = IsNotString<unknown, { selection: 'filter' }> // unknown
type R = IsNotString<string | boolean, { selection: 'filter' }> // boolean
🔢 customize:
Disable distribution of union types.
type R = IsNotString<string | 1> // boolean
type R = IsNotString<string | 1, { distributive: false }> // false
🔢 customize
Use unique branch identifiers to allow precise processing of the result.
🎭 predicate
Validate if
T
is notstring
norstring
literals.