indicative-compiler
Version:
Indicative compiler to compile parsed schema into highly optimized functions
21 lines (20 loc) • 674 B
TypeScript
/**
* @module compiler/validator
*/
import { ArrayWrapper } from './ArrayWrapper';
import { ValidationsRunner } from './ValidationsRunner';
import { ErrorFormatterContract, ErrorCollectorFn } from '../Contracts';
/**
* Executor is meant to execute the compiled functions with runtime
* data.
*/
export declare class Executor {
private fns;
constructor(fns: (ArrayWrapper | ValidationsRunner)[]);
/**
* Executes the compiled functions in sequence.
*/
exec(data: any, Formatter: {
new (): ErrorFormatterContract;
}, config: unknown, bail: boolean, removeAdditional: boolean, customErrorCollector?: ErrorCollectorFn): Promise<any>;
}