import { type Getter } from "jotai"; import { z } from "zod"; import { type ValidateConfig } from "./schemaValidate"; interface MakeSchema { (fieldSchema: Schema): Schema; (fieldSchema: Schema, get: Getter): Schema; } export type UserValidateConfig = { /** * User's zod schema, or a function to enhance the initial field schema. */ schema?: Schema | MakeSchema; optionalSchema?: OptSchema | MakeSchema; }; export type InitialSchemas = { /** * The default schema of a field. */ schema: Schema; optionalSchema?: OptSchema; }; /** * A helper to combine user schema with the initial field schema. * When the user schema is not dependend on other atoms (single argument function), * the extended zod functions are pre-computed as to not combine them in each validate call. * @param initial the default schemas of a field. * @param user the optional user schemas or extend functions. * @returns */ export declare function prepareSchema({ initial, user, }: { initial: InitialSchemas; user: Partial>; }): ValidateConfig; export {};