/// import Validator, { IValidateCtxUserData, IValidationProc } from './validator'; export interface ValidationError extends Error { type: 'validation'; msg?: string; _property?: TP; _value?: any; } export default class Enforce { private options?; private validations; private contexts; constructor(options?: { returnAllErrors: boolean; }); add(property: TPROP, _validator: IValidationProc | Validator): this; context(): TENCTX; context(name: keyof TENCTX): TENCTX[keyof TENCTX]; context(name: keyof TENCTX, value: any): this; clear(): void; checkSync = {}>(data: TD): ValidationError[]; check(data: any, cb: (errors: null | ValidationError | ValidationError[]) => void): void; }