import { type Expression, type Program, type ValueType } from "@velarscript/compiler/extension"; import { VelarNodeServeCallAnalyzer } from "./serve-call-analysis.ts"; /** * The half of the Node analyzer that owns the `HttpProblem` rename — both sides * of it, the read and the construction. * * It is a class in the analyzer's chain rather than a helper because both rules * need the `inferExpression` seam its base holds open: the receiver's and the * callee's types are read from what this analyzer has already inferred, so * neither rule costs a second inference nor reorders Core's own bookkeeping. */ export declare class VelarNodeProblemAnalyzer extends VelarNodeServeCallAnalyzer { /** * The construction sites this rule has already answered for, so the object * literal's own two reports can be dropped exactly once and a second pass * over the same span cannot double the replacement. */ private readonly rewrittenProblemOptions; /** * D114 F10-node, audit NO-I2: every record literal this module binds to a * name, so a construction written as `HttpProblem(record)` can be answered at * the `code:` the author actually wrote rather than at the variable that * carries it. A name declared more than once is dropped: two literals are two * possible carets, and a rule that guesses between them would put the caret * on a key the call may never reach. */ private problemRecordLiterals; analyze(program: Program): readonly import("@velarscript/compiler").Diagnostic[]; protected inferExpression(expression: Expression, contextualType?: ValueType): ValueType; /** * The `code:` an `HttpProblem` is still being constructed with — the one * construction site every 0.29 program has. * * The receiver's type is not available before Core has inferred the callee, * so the call is recognised by its shape first (a call whose sole argument is * an object literal that writes `code` and not `reason`) and confirmed by the * callee's type afterwards, once Core has recorded it. */ private retiredProblemOption; /** * D114 F9-node-cli, audit NO-I1: one report, naming the successor, carrying * the rewrite. * * The read side of this rename was the model — one rejection, `reason` named, * `velar fix` applying it — and the construction side was two generic reports * that never said the word `reason`: "Object is missing required field * 'reason'" on the whole literal and "Object has no field 'code'" on the * entry, and `velar fix` changed nothing. Those two are the object contract * answering a question the author did not ask; they are dropped for this * literal and replaced by the one sentence the rename owes, with the * mechanical rewrite of the key itself so `velar fix` finishes the migration * on both sides in one run. */ private reportRetiredProblemOption; /** Whether the value handed to the constructor really writes `code` and no `reason`. */ private writesRetiredProblemCode; private isHttpProblem; private reportRetiredProblemMember; } //# sourceMappingURL=serve-problem-analysis.d.ts.map