🌪️ filter
Returns T if T is not unknown, otherwise $Unknown.
T
unknown
$Unknown
type R = NotUnknownOr<number> // numbertype R = NotUnknownOr<unknown> // $Unknown// customizetype R = NotUnknownOr<unknown, number> // number Copy
type R = NotUnknownOr<number> // numbertype R = NotUnknownOr<unknown> // $Unknown// customizetype R = NotUnknownOr<unknown, number> // number
🔢 customize
Replace unknown branch with Replace.
Replace
type R = NotUnknownOr<unknown, number> // number Copy
type R = NotUnknownOr<unknown, number> // number
🌪️ filter
Returns
T
ifT
is notunknown
, otherwise$Unknown
.