FormatRulesEngineOptions
Defined in: rules-engine/src/types/export.ts:53
Options object shape for formatRulesEngine.
Properties
context?
optionalcontext?:Record<string,unknown>
Defined in: rules-engine/src/types/export.ts:83
Arbitrary values passed through to the rules engine processor.
For the "json-rules-engine" format, set the engine property to an Engine instance and the
additional operators (beginsWith, between, etc.)
will be registered on it as a side effect, so exported rules that use those operators can be
evaluated without registering the operators yourself.
Example
const engine = new Engine();
for (const rule of formatRulesEngine(re, {
format: 'json-rules-engine',
context: { engine },
})) {
engine.addRule(rule);
}
evaluationMode?
optionalevaluationMode?:EvaluationMode
Defined in: rules-engine/src/types/export.ts:65
Overrides the react-querybuilder!RulesEngine.evaluationMode evaluationMode stored on
the rules engine object. If neither is specified, defaults to "cascade".
"cascade": conditions are evaluated in order; a later sibling only fires if all prior siblings' antecedents failed (if/else-if/else semantics)."cumulative": every condition is evaluated independently and any number may fire.
format?
optionalformat?:RulesEngineExportFormat
Defined in: rules-engine/src/types/export.ts:54
formatQueryOptions?
optionalformatQueryOptions?:FormatQueryOptions
Defined in: rules-engine/src/types/export.ts:56
rulesEngineProcessor?
optionalrulesEngineProcessor?:RulesEngineProcessor<unknown>
Defined in: rules-engine/src/types/export.ts:55
API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.