type R = $Select<undefined, undefined> // true
type R = $Select<never, undefined> // false
type R = $Select<unknown, undefined> // false
type R = $Select<string | boolean, undefined> // false
type R = $Select<string | undefined, undefined> // boolean
🔢 customize
Filter to ensure T
is U
, otherwise returns never
.
type R = $Select<undefined, undefined, { selection: 'filter' }> // undefined
type R = $Select<never, undefined, { selection: 'filter' }> // never
type R = $Select<unknown, undefined, { selection: 'filter' }> // never
type R = $Select<string | boolean, undefined, { selection: 'filter' }> // never
type R = $Select<string | undefined, undefined> // undefined
🔢 customize:
Disable distribution of union types.
type R = $Select<undefined | 1, undefined> // boolean
type R = $Select<undefined | 1, undefined, { distributive: false }> // false
🔢 customize
Use unique branch identifiers to allow precise processing of the result.
🎭 predicate ㊙️ internal
Validate if
T
isU
.