Type alias $SelectionPredicate

$SelectionPredicate: {
    $else: false;
    $then: true;
}

🧰 type util

Default Options for predicate selection logic.

predicate means the logic returns true or false depending on the condition.

Type declaration

  • $else: false
  • $then: true

Example

type YourType<
T,
Options extends YourType.$Options = YourType.$Default> = ...

namespace YourType {
export type $Options = $SelectionOptions
export type $Default = $SelectionPredicate
}

type R = YourType<ThenType> // true
type X = YourType<ElseType> // false

Generated using TypeDoc