//#region src/shield/types.d.ts type ShieldRule = Record> = RuleInterface | LogicRuleInterface; interface RuleInterface = Record> { name: string; equals: (rule: RuleInterface) => boolean; resolve: (ctx: TContext, type: string, path: string, input: { [name: string]: any; }, rawInput: unknown, options: OptionsInterface) => Promise; executeRule: >(ctx: TContext, type: string, path: string, input: { [name: string]: any; }, rawInput: unknown, options: OptionsInterface) => string | boolean | Error | Promise; } interface RuleOptionsInterface {} interface LogicRuleInterface = Record> extends RuleInterface { getRules: () => ShieldRule[]; evaluate: (ctx: TContext, type: string, path: string, input: { [name: string]: any; }, rawInput: unknown, options: OptionsInterface) => Promise; resolve: (ctx: TContext, type: string, path: string, input: { [name: string]: any; }, rawInput: unknown, options: OptionsInterface) => Promise; } type RuleResultInterface = boolean | string | Error; type RuleFunctionInterface = Record> = (ctx: TContext, type: string, path: string, input: { [name: string]: any; }, rawInput: unknown, options: OptionsInterface) => RuleResultInterface | Promise; interface RuleConstructorOptionsInterface {} interface RuleTypeMapInterface = Record> { [key: string]: ShieldRule | RuleFieldMapInterface | RuleTypeMapInterface; } interface RuleFieldMapInterface = Record> { [key: string]: ShieldRule; } type IRules = Record> = ShieldRule | RuleTypeMapInterface; type IFallbackErrorMapperType = Record> = (err: unknown, ctx: TContext, type: string, path: string, input: { [name: string]: any; }, rawInput: unknown) => Promise | Error; type IFallbackErrorType = Record> = Error | IFallbackErrorMapperType; interface OptionsInterface = Record> { debug: boolean; allowExternalErrors: boolean; fallbackRule: ShieldRule; fallbackError?: IFallbackErrorType; } interface OptionsConstructorInterface = Record> { debug?: boolean; allowExternalErrors?: boolean; fallbackRule?: ShieldRule; fallbackError?: string | IFallbackErrorType; } declare function shield = Record>(ruleTree: IRules, options: OptionsInterface): any; //#endregion export { IFallbackErrorMapperType, IFallbackErrorType, IRules, LogicRuleInterface, OptionsConstructorInterface, OptionsInterface, RuleConstructorOptionsInterface, RuleFieldMapInterface, RuleFunctionInterface, RuleInterface, RuleOptionsInterface, RuleResultInterface, RuleTypeMapInterface, ShieldRule, shield }; //# sourceMappingURL=types.d.mts.map