walkRulesEngine()
walkRulesEngine<
G>(rulesEngine:RulesEngineAny,mode:EvaluationMode,__namedParameters:WalkPrimitives<G>):FlatRule<G>[]
Defined in: rules-engine/src/utils/formatRulesEngine/walkRulesEngine.ts:40
Flattens a react-querybuilder!RulesEngine RulesEngine into an ordered list of
guard/consequent pairs, reproducing the if/else-if/else ("cascade") or independent
("cumulative") semantics shared by the runnable export targets.
Each emitted guard ANDs the condition's own antecedent with its ancestor antecedents and—in
"cascade" mode—the negated antecedents of its prior siblings. A defaultConsequent is guarded
by all sibling antecedents (cascade else) or is always-true (cumulative baseline). A condition
with nested conditions but no consequent contributes only a guard for its children.
Type Parameters
| Type Parameter |
|---|
G |
Parameters
| Parameter | Type |
|---|---|
rulesEngine | RulesEngineAny |
mode | EvaluationMode |
__namedParameters | WalkPrimitives<G> |
Returns
FlatRule<G>[]
API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.