import { AnySchema } from './AnySchema'; import { StringSchema } from './StringSchema'; import { ObjectSchema } from './ObjectSchema'; import { ArraySchema } from './ArraySchema'; import { BooleanSchema } from './BooleanSchema'; import { NumberSchema } from './NumberSchema'; import { DateSchema } from './DateSchema'; export declare type Path = Array; export interface ErrorDetails { message: string; path: Path; type: string; value: any; } declare type Validate = (value: any, path: Path) => { error?: ErrorDetails; errors?: ErrorDetails[]; stop?: boolean; value?: any; } | null; export interface Validator { priority?: number; type: string; validate: Validate; } export declare type Schema = AnySchema | ArraySchema | BooleanSchema | DateSchema | NumberSchema | ObjectSchema | StringSchema; export declare type SchemaLike = Schema | SchemaMap; export interface SchemaMap { [key: string]: SchemaLike | SchemaLike[]; } export {};