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