Skip to content
中文

Configuration, catalogs & policies ​

Core · Interfaces & runtime guarantees · Back to layer index

SymbolKindPurpose
BreakCheckinterfaceEach rule owns a semantic/readability group and its tags, independently of shared errors.
BreakEventinterfaceDiagnostic metadata only; rule inputs and request data are not included.
BreakPredicatetypeEach predicate is evaluated only after the preceding predicates passed.
BreakReasontypeLazy reasons preserve error construction and message evaluation on the rejection path only.
breakWhilefunctionReject as soon as one of several conditions holds. Ordinary processing stays an ordinary if; this helper is for validation tables whose entries are evaluated in order and stop at the first failure. Behaviour that depends on earlier entries is expressed with a callback form. Reject when any predicate holds, reporting the given observer tags. Reject when any structured check holds. Each check may carry its own reason and tags; the first match stops the evaluation. Reject when a single value is truthy. Ordinary truthiness applies, so a function passed as a value counts as a failure; use the predicate form to evaluate it instead. Reject when a single value is truthy, reporting the given observer tags.
BreakWhileConfiginterfaceGlobal rejection observer installed once per process.
matchRulefunctionDispatch to the first matching rule. A rule without a pattern matches unconditionally, so the table's order decides precedence. The first match owns the result even when its handler returns undefined, and later rules are not consulted.
MatchRuleinterfaceOrder is priority. Patterns may inspect values, types, state or regular expressions.
WalkRuleinterfaceSynchronous traversal; local rules may omit catalog metadata.
walkRulesfunctionWalk every rule in order, mutating the shared input. Later rules observe the mutations of earlier ones, which is why traversal is strictly sequential and every participant must be synchronous. Throwing stops the walk immediately; remaining rules are skipped. Walk every rule in order, mutating the shared input.

API reference, usage examples and developer guides.