import type { z } from 'zod'; type WithDefaultResult = z.ZodPrefault; export type WithDefaultType = (schema: T, defaultValue: z.input) => WithDefaultResult; /** * Creates a schema decorator that applies a default value. * * Uses `prefault` to ensure defaults are populated during Zod parse, and * registers the default value in the registry so `cleanDefaultValues()` can * strip matching values during serialization. * * Can be used standalone with `.apply()`: * ```typescript * z.boolean().apply(withDefault(false)) * ``` * * @param defaultValue - The default value to apply * @returns A function that decorates a schema with the default value */ export declare function withDefault(defaultValue: unknown): (schema: T) => WithDefaultResult; /** * Extends the parser context with default value handling functionality. * * @returns An object containing the withDefault method */ export declare function extendParserContextWithDefaults(): { withDefault: WithDefaultType; }; export {}; //# sourceMappingURL=extend-parser-context-with-defaults.d.ts.map