type R = IsNotNever<1> // true
type R = IsNotNever<never> // false
🔢 customize
Filter to ensure T
is not never
, otherwise returns $Never
.
Filter normally returns never
in the $else
clause.
But since we are checking for never
here,
we have to return $Never
instead.
type R = IsNotNever<1, { selection: 'filter' }> // 1
type R = IsNotNever<never, { selection: 'filter' }> // $Never
🔢 customize
Use unique branch identifiers to allow precise processing of the result.
type R = IsNotNever<never, $SelectionBranch> // $Else
type R = IsNotNever<1, $SelectionBranch> // $Then
Generated using TypeDoc
🎭 predicate
Validate if
T
notnever
.