/** * `assign` runtime semantics — reassignment of an existing mutable binding. * * Operational semantics: * 1. Resolve the existing binding named by `target` in the current * environment (it MUST already exist — implicit declaration-by-assign * diverges: Python auto-creates a local, strict TS rejects it). * 2. Evaluate the RHS exactly once over the shared portable-scalar domain. * 3. Apply the operator in place (`=` stores the RHS; `+=` adds numbers or * concatenates strings) and emit one observable trace event * `{op:"assign", target, value}` carrying the *new* value. * 4. Complete normally. * * Portability domain: * - `target` is a simple, non-reserved identifier already bound to a number, * string, or boolean. (A null/undefined-typed binding can't be portably * reassigned — TS infers a narrow type that rejects the new value.) * - `op` is `=` or `+=` only. Plain `=` MUST preserve the binding's type; * `+=` requires both operands to be numbers (add) or both strings (concat). * - The RHS is a portable scalar expression (see `./portable-scalar.ts`). * * Exclusions (out of domain — must fail preconditions): * Implicit declaration via assign; assigning an undeclared name; `const` * reassignment (rejected at emit time, not reachable here); cross-type * reassignment (`number = "x"`); cross-type compound (`number += "x"`); * postfix `++`/`--` and compound ops other than `+=`; destructuring, * property, and index targets. */ import { type NodeContract } from './index.js'; export declare const assignContract: NodeContract; /** Idempotent registration. Test cleanup that clears the registry must re-call. */ export declare function registerAssignContract(): void; /** Reset registration flag — only for test cleanup that clears the registry. */ export declare function _resetAssignContractForTest(): void;