import * as plugins from './smartrule.plugins.js'; import { SmartRule } from './smartrule.classes.smartrule.js'; export type TTreeActionResult = 'continue' | 'apply-continue' | 'apply-stop' | 'stop'; export type TActionFunc = (objectArg: T) => 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; } }