🎭 predicate
Validate if T is not exactly unknown.
T
unknown
type R = IsNotUnknown<unknown> // falsetype R = IsNotUnknown<number> // truetype R = IsNotUnknown<never> // true Copy
type R = IsNotUnknown<unknown> // falsetype R = IsNotUnknown<number> // truetype R = IsNotUnknown<never> // true
🔢 customize
Filter to ensure T is not exactly unknown.
type R = IsNotUnknown<unknown, { selection: 'filter' }> // nevertype R = IsNotUnknown<number, { selection: 'filter' }> // numbertype R = IsNotUnknown<never, { selection: 'filter' }> // never Copy
type R = IsNotUnknown<unknown, { selection: 'filter' }> // nevertype R = IsNotUnknown<number, { selection: 'filter' }> // numbertype R = IsNotUnknown<never, { selection: 'filter' }> // never
Use unique branch identifiers to allow precise processing of the result.
type R = IsNotUnknown<unknown, $SelectionBranch> // $Elsetype R = IsNotUnknown<string, $SelectionBranch> // $Then Copy
type R = IsNotUnknown<unknown, $SelectionBranch> // $Elsetype R = IsNotUnknown<string, $SelectionBranch> // $Then
🎭 predicate
Validate if
T
is not exactlyunknown
.