Skip to content

MatcherFn

type MatcherFn = (query, subject, context) => boolean;

Defined in: matchers.ts:53

Decides whether a matches/notMatches condition is satisfied.

Parameter Type Description
query JsonValue The condition’s value — a JSON query document.
subject unknown What to match against: context[attribute] when the condition names an attribute, otherwise the whole EvaluationContext.
context EvaluationContext The full evaluation context (always provided, for matchers that want cross-attribute access regardless of subject).

boolean

true if the query matches. May throw — a throw fails the condition closed (treated as “no clean result”).