Options to specifically handles the never type.

type YourType<T, $Options extends $Never.$Options> = ...
interface Options {
    $else?: unknown;
    $never?: unknown;
    $notArray?: unknown;
    $then?: unknown;
    selection?: "filter" | "predicate";
}

Hierarchy (View Summary)

Properties

$else?: unknown
$never?: unknown
$notArray?: unknown
$then?: unknown
selection?: "filter" | "predicate"

Specifies 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.