@cabloy/zod-errors-custom
Version:
zod-errors-custom
11 lines (10 loc) • 526 B
TypeScript
import type z from 'zod';
export type LocaleAdapterFn = (text: string, ...args: any[]) => string;
export type LocaleCurrentAdapterFn = () => string;
export type ZodLocaleError = () => {
localeError: z.core.$ZodErrorMap;
};
export type ZodLocaleErrors = Record<string, ZodLocaleError>;
export type ZodLocaleErrorsInstance = Record<string, z.core.$ZodErrorMap>;
export declare function translateError(localeAdapterFn: LocaleAdapterFn, key: string, scope?: object): string;
export declare function toRaw(observed: any): any;