import { PreprocessEffectIR, RefineEffectCheckIR, SuperRefineEffectCheckIR, TransformEffectIR } from "../../types.js"; import { FastGen, SlowGen } from "../context.js"; //#region src/core/codegen/schemas/effect.d.ts /** * Generate code for a TransformEffectIR node. * Validates the inner schema, then applies the transform function and writes back the result. */ declare function slowEffect(ir: TransformEffectIR | PreprocessEffectIR, g: SlowGen): string; /** * Generate code for a RefineEffectCheckIR (inline refine function call). * Called from string/number/object check loops when a refine_effect is encountered. * * @param check - The refine effect check IR * @param expr - The expression to validate (may differ from g.input, e.g. objVar in object generators) * @param g - SlowGen context (provides path, issues) */ declare function refineCheck(check: RefineEffectCheckIR, expr: string, g: SlowGen): string; /** * Fast-path test for a RefineEffectCheckIR: the predicate's verdict, bound to a * local so a Promise can be told apart from a truthy value. A Promise throws * zod's `$ZodAsyncError` right here, EAGERLY: zod's `runChecks` throws the * moment a check returns a Promise under a synchronous parse — before any later * check, and even inside a union whose next option would have matched — so * deferring the throw to the slow walk (which a fast-eligible schema only runs * when `.error` is read) would turn zod's throw into a failure result. The * throw itself lives in a hosted helper, so the hot expression only pays the * `instanceof` test. */ declare function fastRefineTest(check: RefineEffectCheckIR, expr: string, g: FastGen): string; /** * Fast-path test for a SuperRefineEffectCheckIR: a boolean term reporting that * the callback added no issue and left the value alone (see ZC_SR_OK_DECL). */ declare function superRefineFastTest(check: SuperRefineEffectCheckIR, expr: string, g: FastGen): string; /** * Generate code for a SuperRefineEffectCheckIR: call the payload-taking * callback with a synthesized `{ value, issues }` and merge what it collected. * zod's own wrapper installs `addIssue` and normalizes the result, so the * issues are zod's — the helper only reprojects them onto this node's path and * strips the internal bookkeeping zod deletes before they become visible. * * The payload's `value` is writable public API, so it is written back to the * output slot the way an overwrite effect is. This walk is always the eager one * (the node reports as mutating, see hasMutation), so the write-back lands on * every parse that reaches it — not only on failures. */ declare function superRefineCheck(check: SuperRefineEffectCheckIR, expr: string, g: SlowGen): string; //#endregion export { fastRefineTest, refineCheck, slowEffect, superRefineCheck, superRefineFastTest }; //# sourceMappingURL=effect.d.ts.map