x-to-zod / ZodBuilder / buildV3
Variable: buildV3
ts
const buildV3: V3BuildAPI;Defined in: src/ZodBuilder/v3.ts:94
Zod v3-compatible builder factory object.
Mirrors the z namespace from Zod v3 but returns code-generating Builder instances rather than real Zod schemas. Use this when you need to target Zod v3 consumers and want TypeScript to prevent accidentally calling v4-only builder methods.
Prefer importing build from 'x-to-zod/v3' for type-safe v3 usage.
Example
ts
import { buildV3 } from 'x-to-zod/ZodBuilder';
const expr = buildV3.string().optional().text();
// => 'z.string().optional()'