smartrule/dist_ts/smartrule.classes.rule.d.ts

12 lines
599 B
TypeScript
Raw Normal View History

2022-08-07 09:18:02 +00:00
import { SmartRule } from './smartrule.classes.smartrule.js';
export declare type TTreeActionResult = 'continue' | 'apply-continue' | 'apply-stop' | 'stop';
export declare type TActionFunc<T = any> = (objectArg: T) => Promise<any>;
export declare type TCheckFunc<T> = (objectArg: T) => Promise<TTreeActionResult>;
export declare class Rule<T> {
smartRuleRef: SmartRule<T>;
priority: number;
checkFunction: TCheckFunc<T>;
actionFunction: TActionFunc;
constructor(smartRuleRef: SmartRule<T>, priorityArg: number, checkFunctionArg: TCheckFunc<T>, actionFunctionArg: TActionFunc);
}