import * as plugins from './smartrule.plugins'; import { SmartRule } from './smartrule.classes.smartrule'; export type TTreeActionResult = 'continue' | 'apply-continue' | 'apply-stop' | 'stop'; export type TActionFunc = (objectArg) => Promise; export type TCheckFunc = (objectArg: T) => Promise; export class Rule { public smartRuleRef: SmartRule; public priority: number; public checkFunction: TCheckFunc; public actionFunction: TActionFunc; constructor(smartRuleRef: SmartRule, priorityArg: number, checkFunctionArg: TCheckFunc, actionFunctionArg: TActionFunc) { this.smartRuleRef = smartRuleRef; this.priority = priorityArg; this.checkFunction = checkFunctionArg; this.actionFunction = actionFunctionArg; } }