Optional
$elseOptional
$neverOptional
$notOptional
$thenOptional
selectionSpecifies which default selection logic to use.
filter
returns T
when the condition is met,
and returns never
otherwise.
predicate
returns boolean depends on the condition.
Note that setting $then
and $else
overrides the default selection logic.
🧰 type util
$Never.$Options
enables customizing the behavior of the$never
branch.The
$never
branch is used to handle when the input type isnever
.Example