import type { Program } from "./ast.ts"; import type { Span } from "./source.ts"; /** * D90 R19 / the audit's fourth root cause: a `let` binding is not categorically * unstable — it is unstable exactly when something reassigns it. This predicate * answers the decidable half of that question for one module: "has this * binding, declared where `declarationSpan` says, ever been reassigned or * re-declared under the same name anywhere in the program?" A `true` answer * licenses an analysis to treat the binding like a `const` alias; a `false` * answer only means the analysis must contribute nothing and leave the value * to its runtime referee, so `false` is always safe. * * The predicate is conservative by construction: any assignment targeting the * name, any other construct that could bind the name — a second declaration, a * parameter, a `using`, a catch name, an import, a match capture, a * destructuring entry, an embedded-JavaScript binding — and any occurrence of * the name in a position this walk cannot classify (extension statements carry * node kinds Core has never seen) all answer NO. The cost of that bluntness is * a missed static check, never a wrong one. */ export declare function bindingNeverReassigned(program: Program, name: string, declarationSpan: Span): boolean; //# sourceMappingURL=binding-stability.d.ts.map