import { type z as zod } from "zod"; type ZodRefinementCtx = { issues: unknown[]; }; /** * Creates helper Zod schemas, e.g. `intStringSchema`. * @param z `z` from zod. You're required to pass it in, as this library does * not directly depend on zod. */ export declare function createSchemaHelpers(z: typeof zod): { intStringSchema: zod.ZodPipe>; floatStringSchema: zod.ZodPipe>; booleanStringSchema: zod.ZodPipe, zod.ZodTransform>; }; /** * A Zod schema which accepts a string and transforms it to an int. Parsing * fails if the string does not represent a valid integer. * @param z `z` from zod. You're required to pass it in, as this library does * not directly depend on zod. */ export declare function createIntStringSchema(z: typeof zod): zod.ZodPipe>; /** * A Zod schema which accepts a string and transforms it to a float. Parsing * fails if the string does not represent a valid floating-point number. * @param z `z` from zod. You're required to pass it in, as this library does * not directly depend on zod. */ export declare function createFloatStringSchema(z: typeof zod): zod.ZodPipe>; /** * A Zod schema which accepts a string and transforms it to a boolean. Parsing * fails if the string is not exactly equal to "true" or "false". * @param z `z` from zod. You're required to pass it in, as this library does * not directly depend on zod. */ export declare function createBooleanStringSchema(z: typeof zod): zod.ZodPipe, zod.ZodTransform>; /** * Builds a Zod transformation function with a built-in try/catch, so any thrown * errors will be caught and added as a custom issue to the Zod context. * * Usage: * * ```ts * z.string().transform(buildZodTransform((val) => { * // Do something that might throw. * })); * ``` * * @param transformFn The transformation function to apply to the input. * @param errorMessage Optional error message to use if no error message can be * extracted from the thrown error. */ export declare function buildZodTransform(transformFn: (input: I) => O, errorMessage?: string): (val: I, ctx: ZodRefinementCtx) => O; export {};