import { CheckIR, CheckStringFormat, StringIR } from "../../types.js"; import { CodeGenContext, FastGen, SlowGen } from "../context.js"; //#region src/core/codegen/schemas/string.d.ts /** * Is this a `z.url()` check — one that trims the value and writes back a * rewrite of it? A patterned "url" is a custom format that borrowed the name * (see buildString), validating through its own regex like any other format. */ declare function isUrlRewrite(check: StringIR["checks"][number]): boolean; /** * The url check on the build path: {@link slowUrlCheck}'s verdict and * write-back as statements over `value`, which leave the rewritten value in it * and `return fail` at the first failure rather than push an issue — the * deferred walk reports those. */ declare function buildUrlCheck(check: CheckStringFormat, value: string, fail: string, temp: (prefix: string) => string, ctx: CodeGenContext): string; declare function slowString(ir: StringIR, g: SlowGen): string; /** * Boolean expression testing ONE compiled string check against `x`, or null when * the check is not expressible as a pure predicate (`z.url()`, which trims and * normalizes, and an unknown format with no pattern). * * Shared by the fast path — which sorts the checks cheapest-first and joins them * with `&&` — and by the build path, which emits them one statement at a time in * DECLARATION order so an interleaved `.trim()` rewrite is visible to the checks * that follow it (see buildString). */ declare function fastStringCheck(check: CheckIR, x: string, ctx: CodeGenContext): string | null; declare function fastString(ir: StringIR, g: FastGen): string | null; //#endregion export { buildUrlCheck, fastString, fastStringCheck, isUrlRewrite, slowString }; //# sourceMappingURL=string.d.ts.map