type R = NotAssignable<any, any> // false
type R = NotAssignable<any, 1> // false
type R = NotAssignable<unknown, unknown> // false
type R = NotAssignable<never, never> // false
type R = NotAssignable<1, 1> // false
type R = NotAssignable<'a', 'a'> // false
type R = NotAssignable<'a', 'b'> // true
type R = NotAssignable<'a', string> // false
🔢 customize
Filter to ensure A
is not assignable to B
.
type R = NotAssignable<any, any, { selection: 'filter' }> // never
type R = NotAssignable<string, number, { selection: 'filter' }> // string
🔢 customize
Use unique branch identifiers to allow precise processing of the result.
🎭 predicate
Validate if
A
is not assignable toB
.