/** * `fmt` runtime semantics — string interpolation / template. * * Operational semantics: * 1. Parse the `template=` body into literal quasis + interpolation * expressions (reusing KERN's template-literal parser). * 2. Evaluate each interpolation left-to-right over the portable scalar * domain, exactly once. * 3. Format each value via KERN-canonical formatting (string = exact; * finite integer = base-10; bool = "true"/"false"; null = "null") and * concatenate with the literal quasis. * 4. Bind the result to `name` and emit one observable assignment event * `{op:"assign", target:name, value}`. Complete normally. * * Portability domain: * - `name` is a simple, non-reserved identifier, not already bound. * - Interpolated values are portable scalars; bool and null are admitted * ONLY as the canonical strings "true"/"false"/"null" — never raw host * formatting (Python `str(True)`="True", `str(None)`="None" diverge). * The Python emitter routes every interpolation through `_kern_fmt` to * match TS template-literal coercion; this contract proves that parity. * * Exclusions (out of domain — fail preconditions): * Floats / non-integers (TS `1.0`->"1" vs Python "1.0"); bigint; objects / * arrays; undefined; escape sequences in the literal text (whose cooked * runtime value would have to be replicated here); the `return=true` * position form (no observable binding to compare). */ import { type NodeContract } from './index.js'; export declare const fmtContract: NodeContract; /** Idempotent registration. Test cleanup that clears the registry must re-call. */ export declare function registerFmtContract(): void; /** Reset registration flag — only for test cleanup that clears the registry. */ export declare function _resetFmtContractForTest(): void;