UNPKG

@jss-rule-engine/core

Version:

Rule engine for Sitecore JSS

16 lines (10 loc) 479 B
import { RuleData, RuleEngineContext } from "../types/ruleEngine"; export default async function(rule:RuleData, ruleContext: RuleEngineContext) { let operatorId = rule.attributes?.get('operatorid'); var operator = ruleContext.ruleEngine?.operatorDefinitions.get(operatorId); if(!operator) { throw new Error("Operator definition is missing for id " + operatorId); } throw new Error("Device name rule not supported."); }