UNPKG

jsonpolice

Version:

JSON Schema parser and validator

20 lines (19 loc) 607 B
export declare class SchemaError extends Error { scope: string; info?: any | undefined; constructor(scope: string, type: string, info?: any | undefined); } export interface ValidationErrorInfo { type: string; path?: string; scope?: string; errors?: ValidationErrorInfo[]; } export declare class ValidationError extends Error { path: string; scope: string; errors?: Error[] | undefined; constructor(path: string, scope: string, type: string, errors?: Error[] | undefined); getInfo(): ValidationErrorInfo; static getInfo(err: Error): ValidationErrorInfo; }