import type { SafeParseReturnType, ZodIssue } from 'zod/v3'; import type { FormError } from '@conform-to/dom/future'; /** * Transforms Zod validation results into Conform's error format. * * **Example:** * ```ts * const result = schema.safeParse(formData); * const error = formatResult(result); * ``` */ export declare function formatResult(result: SafeParseReturnType): FormError | null; export declare function formatResult(result: SafeParseReturnType, options: { /** Whether to include the parsed value in the returned object */ includeValue: true; /** Custom function to format validation issues for each field */ formatIssues: (issue: ZodIssue[], name: string) => ErrorShape; }): { error: FormError | null; value: Output | undefined; }; export declare function formatResult(result: SafeParseReturnType, options: { includeValue: true; formatIssues?: undefined; }): { error: FormError | null; value: Output | undefined; }; export declare function formatResult(result: SafeParseReturnType, options: { includeValue?: false; formatIssues: (issue: ZodIssue[], name: string) => ErrorShape; }): FormError | null; //# sourceMappingURL=format.d.ts.map