import { Path, InferStateValueType, ExtensionFactory } from '@hookstate/core'; export declare type ValidationSeverity = 'error' | 'warning'; export interface ValidationError { readonly message: string; readonly path: Path; readonly severity: ValidationSeverity; } export interface Validation { validate>(rule: (value: S) => boolean, message: string | ((value: S) => string), severity?: ValidationSeverity): void; valid(options?: { depth?: number; }): boolean; invalid(options?: { depth?: number; }): boolean; firstError(filter?: (e: ValidationError) => boolean, depth?: number): ValidationError | undefined; errors(filter?: (e: ValidationError) => boolean, depth?: number, first?: boolean): ReadonlyArray; } export declare function validation(): ExtensionFactory; //# sourceMappingURL=validation.d.ts.map