import { Store } from '../types'; export type ValidationErrors = Record; export type ValidationFn = (state: T) => ValidationErrors | undefined | null | false; export interface SafeParseSchema { safeParse: (state: T) => { success: true; data?: any; } | { success: false; error: { issues?: any[]; errors?: any[]; message?: string; }; }; } export interface ParseSchema { parse: (state: T) => unknown; } export type SchemaLike = SafeParseSchema | ParseSchema; export interface ValidationOptions { validator?: ValidationFn; schema?: SchemaLike; asyncValidator?: (state: T) => Promise; onValidationError?: (errors: ValidationErrors) => void; behavior?: 'reject' | 'warn'; } export declare function validationMiddleware(opts: ValidationOptions): (store: Store) => Store;