footprintjs - v11.2.0
    Preparing search index...

    Function select

    • Evaluates ALL rules (not first-match). Returns a branded SelectionResult.

      Type Parameters

      • S extends object

      Parameters

      • scope: S

        TypedScope or ScopeFacade

      • rules: DecideRule<S>[]

        Array of DecideRule (function or filter when clauses)

        Error behavior: If a when function throws during evaluation, the rule is treated as non-matching (matched: false) and the error message is captured in matchError on that rule's RuleEvidence entry. Evaluation continues with remaining rules; errors do not propagate to the caller.

        Empty-filter behavior (anti-vacuous-truth): a filter rule whose when is {} (no evaluable conditions) NEVER matches — same rule as decide(); an always-selected branch must be expressed explicitly, not via an empty filter. Unknown filter operators also never match (dev mode warns).

      Returns SelectionResult