import { Analyzer, type Expression, type Program, type ValueType } from "@velarscript/compiler/extension"; /** * The seam every `velar/serve` call-site rule in this package shares, and the * first of those rules. * * Core resolves a call's callee and a member access's receiver from inside its * own analysis, which reaches this override, so every type this module infers * is recorded by span here and the rules above read it afterwards. That keeps * analysis single-run: a rule costs no second inference and cannot reorder * Core's own bookkeeping. * * ── The static root a build can already see ──────────────────────────────── * * D114 F9-node-cli, audit NO-U2: `file("/x", root="../shared")` compiled, and * `velar check` passed, and the program then served files the project does not * contain. Every other part of this toolchain refuses source that leaves the * project; a directory that leaves it was the one thing nobody looked at. The * runtime refuses it now — `velar/serve` judges the root where it turns it into * a path, so `staticFiles` refuses while the application is still being * assembled and `file`/`fileResponse` refuse the first time a route reaches * them — but a literal root is knowable long before that, and a build that can * see a defect must not wait for a request to prove it. * * Literals and Core's proved immutable scalar expressions are judged. A root * that requires runtime evaluation remains with the runtime, for the reason the route-conflict referee gives * for the same choice: a false refusal blocks a correct program. */ export declare class VelarNodeServeCallAnalyzer extends Analyzer { /** * Every type this module infers, by span. The receiver or callee's entry is * present by the time the expression that owns it returns, so reading it * afterwards is always answering about something already inferred. */ protected readonly inferredTypesBySpan: Map; analyze(program: Program): readonly import("@velarscript/compiler").Diagnostic[]; protected inferExpression(expression: Expression, contextualType?: ValueType): ValueType; /** * The `root` argument of the three `velar/serve` functions that name a * directory, when Core can prove its scalar value. * * Its resolved import identity, including immutable aliases, selects the * contract. Core's existing named-argument plan selects the root slot. */ private checkServeStaticRoot; } //# sourceMappingURL=serve-call-analysis.d.ts.map