UNPKG

590 BTypeScriptView Raw
1import { ValidateFunction } from 'ajv';
2export declare class ValidationError extends Error {
3 errors: any;
4 readonly name = "ValidationError";
5 constructor(message: string, errors: any);
6}
7export interface ClassValidator {
8 [method: string]: ValidateFunction;
9}
10export declare function createClassValidator(schema: {
11 definitions: {
12 [key: string]: any;
13 };
14}, className: string, field: string): ClassValidator;
15export declare function createReturnTypeValidator(schema: {
16 definitions: {
17 [key: string]: any;
18 };
19}, className: string): ClassValidator;