import type { SchemaShape } from './jsonSchema/schemaShape.js'; import type { ValidationErrors } from './superValidate.js'; import type { JSONSchema } from './jsonSchema/index.js'; import type { ValidationIssue } from './adapters/adapters.js'; export declare class SuperFormError extends Error { constructor(message?: string); } export declare class SchemaError extends SuperFormError { readonly path: string | undefined; constructor(message: string, path?: string | (string | number | symbol)[]); } export declare function mapErrors(errors: ValidationIssue[], shape: SchemaShape): Record & { _errors?: string[]; }; /** * Filter errors based on validation method. * auto = Requires the existence of errors and tainted (field in store) to show * oninput = Set directly */ export declare function updateErrors>(New: ValidationErrors, Previous: ValidationErrors, force?: boolean): ValidationErrors; export declare function flattenErrors>(errors: ValidationErrors): { path: string; messages: string[]; }[]; /** * Merge defaults with parsed data. */ export declare function mergeDefaults>(parsedData: Record | null | undefined, defaults: T): T; /** * Merge defaults with (important!) *already validated and merged data*. * @DCI-context */ export declare function replaceInvalidDefaults>(Data: Record, Defaults: T, _schema: JSONSchema, Errors: ValidationIssue[], preprocessed: (keyof T)[] | undefined): T;