import { DefaultIR } from "../../types.js"; import { FastGen, SlowGen } from "../context.js"; //#region src/core/codegen/schemas/default.d.ts /** * Expression for the declared default value, read off the retained schema so a * reference-typed default keeps zod's identity (one shared object, not a copy). */ declare function defaultValueExpr(ir: DefaultIR): string; /** * Zod's `handleDefaultResult`: after the inner schema runs on a DEFINED input, * an `undefined` result gets the default applied too — so * `z.string().transform(() => undefined).default("d")` yields "d", not undefined. * * Emitted only when the inner can actually yield `undefined`, which is what * `rejectsUndefined` decides; the overwhelmingly common * `z.number().default(1)` shape therefore pays nothing for it. */ declare function needsPostInnerDefault(ir: DefaultIR): boolean; declare function slowDefault(ir: DefaultIR, g: SlowGen): string; /** * By-reference form: a present value that the inner accepts. `undefined` is * refused even though the schema takes it, because the fast path's caller hands * back the INPUT on success and the schema's answer there is the default. * * Acceptance form (see FastGen.acceptance): `undefined` accepted, as zod does — * the default fires, and the schema succeeds. Only a verdict is read from this * form, so no payload can go wrong; it is what makes `.is()` on a defaulted * schema a total, zero-allocation predicate. */ declare function fastDefault(ir: DefaultIR, g: FastGen): string | null; //#endregion export { defaultValueExpr, fastDefault, needsPostInnerDefault, slowDefault }; //# sourceMappingURL=default.d.ts.map