mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-27 17:50:56 +00:00
21 lines
592 B
TypeScript
21 lines
592 B
TypeScript
import type { FormErrors } from '../../types';
|
|
interface ZodError {
|
|
path: (string | number)[];
|
|
message: string;
|
|
}
|
|
interface ZodParseSuccess {
|
|
success: true;
|
|
}
|
|
interface ZodParseError {
|
|
success: false;
|
|
error: {
|
|
errors: ZodError[];
|
|
};
|
|
}
|
|
interface ZodSchema<T extends Record<string, any>> {
|
|
safeParse: (values: T) => ZodParseSuccess | ZodParseError;
|
|
}
|
|
/** @deprecated Use https://github.com/mantinedev/mantine-form-zod-resolver */
|
|
export declare function zodResolver<T extends Record<string, any>>(schema: ZodSchema<T>): (values: T) => FormErrors;
|
|
export {};
|