import { MapIR, SchemaIR } from "../../types.js"; import { FastGen, SlowGen } from "../context.js"; //#region src/core/codegen/schemas/map.d.ts /** * Map entries report through zod's `handleMapResult`, which branches on the * RUNTIME type of the key rather than on the key schema: * * - a property-key type (string | number | symbol) addresses the entry, so key * AND value issues are prefixed with the key itself → `[...mapPath, key, …]`. * This holds even when the key is the wrong type for the schema — a `number` * key under `z.map(z.string(), …)` still reports at `[5]`. * - anything else (boolean, bigint, object, …) cannot be a path segment, so the * issues are WRAPPED: key issues into one `invalid_key`, value issues into one * `invalid_element` carrying the offending `key`, both at the map's own path * with the originals nested and finalized. * * The key is snapshotted before validation because zod passes the ORIGINAL key * to both the type test and the prefix, and a mutating key schema (`.trim()`) * would otherwise have rewritten it by then. */ declare function slowMap(ir: SchemaIR & { type: "map"; }, g: SlowGen): string; declare function fastMap(ir: MapIR, g: FastGen): string | null; //#endregion export { fastMap, slowMap }; //# sourceMappingURL=map.d.ts.map