import { CompiledSchema } from "./types.js"; import { ZodType, output } from "zod"; //#region src/core/compile.d.ts /** * Compile a Zod schema into an optimized validator. * * At dev-time, falls back to Zod's runtime validation: the schema itself is * returned (identity-preserving for toJSONSchema/.meta()), tagged with the * compiled marker so build-time discovery can find it. * After `npx zod-compiler generate`, import from the `.compiled.ts` file instead. * * The return type is `T & CompiledSchema>`, preserving the original * Zod schema type for compatibility with libraries like `@hono/zod-validator`. */ declare function compile(zodSchema: T): T & CompiledSchema>; /** * Check if a value is a CompiledSchema created by compile(). * Used by the CLI to discover schemas in source files. * * Like {@link isZodSchema}, this probes values the caller does not control — * every export of every candidate file — and `COMPILED_MARKER in value` fires a * Proxy's `has` trap. A trap that throws (an ORM model, a strict test double) * must not fail the build over an export that was never a candidate. */ declare function isCompiledSchema(value: unknown): value is CompiledSchema; //#endregion export { compile, isCompiledSchema }; //# sourceMappingURL=compile.d.ts.map