配置、清单与策略
Core · 接口与运行保证 · 返回本层目录
| 符号 | 类别 | 用途 |
|---|---|---|
BreakCheck | interface | Each rule owns a semantic/readability group and its tags, independently of shared errors. |
BreakEvent | interface | Diagnostic metadata only; rule inputs and request data are not included. |
BreakPredicate | type | Each predicate is evaluated only after the preceding predicates passed. |
BreakReason | type | Lazy reasons preserve error construction and message evaluation on the rejection path only. |
breakWhile | function | Reject 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. |
BreakWhileConfig | interface | Global rejection observer installed once per process. |
matchRule | function | Dispatch 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. |
MatchRule | interface | Order is priority. Patterns may inspect values, types, state or regular expressions. |
WalkRule | interface | Synchronous traversal; local rules may omit catalog metadata. |
walkRules | function | Walk 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. |