/** * The Node analyzer: the composition root its collaborators read it through. * * D115 P4 R4a. What is left here is state — eleven tables the walk fills — the * four `protected` seams Core enters this extension by, the module scan * `analyze` performs before the walk, and the one host object the `analysis/` * collaborators receive. The rules themselves are in `analysis/routes.ts`, * `analysis/handlers.ts` and `analysis/composition.ts`; a private member cannot * be read outside the class it is declared in, so the host that publishes those * tables is built here and nowhere else (D114 line 512, TS2341). */ import { type AnalysisContext, type CompilerAnalysisExtension, type Expression, type Parameter, type Program, type Statement, type ValueType } from "@velarscript/compiler/extension"; import { VelarNodeProblemAnalyzer } from "../serve-problem-analysis.ts"; export declare class VelarNodeAnalyzer extends VelarNodeProblemAnalyzer { private readonly contextualRouteParameters; private readonly routeInputs; /** Servers declared by the module under analysis, the only spread targets this analyzer can resolve. */ private readonly moduleServers; /** Module-level `const alias = name` and `let alias = name` bindings, so a spread of an alias resolves to the server it names. */ private readonly moduleServerAliases; /** Local names imported from velar/serve that name a path-preserving combinator, so a spread of a call resolves through it. */ private readonly moduleServeCombinators; /** One answer per `let` alias name to "was this binding ever reassigned?", because the predicate walks the whole program. */ private readonly stableAliases; /** The program under analysis, held for the alias-stability walk. */ private moduleProgram; /** 当前模块可静态解析的路由目录,包含通过接口注解导入的常量。 */ private routePatternValues; private readonly importedRoutePatternValues; /** 每条路由最终采用的编译期模板;碰撞检查和形参类型都读取这里。 */ private readonly routePatterns; private readonly nodeModulePath; /** The one object every `analysis/` collaborator reads this analyzer through. */ private readonly host; constructor(context?: AnalysisContext, extensions?: readonly CompilerAnalysisExtension[]); analyze(program: Program): readonly import("@velarscript/compiler").Diagnostic[]; protected predeclareExtensionStatement(statement: Statement): boolean; protected analyzeExtensionStatement(statement: Statement): boolean; protected contextualFunctionParameterDefault(statement: { readonly kind: string; }, parameter: Parameter): ValueType | null; protected inferExtensionExpression(expression: Expression, _contextualType: ValueType): ValueType | undefined; /** * What this analyzer's collaborators are allowed to ask of it, and nothing * more. `moduleProgram` and `routePatternValues` are replaced once per * program, so both stay accessors; the other tables are the same objects for * the analyzer's whole life and are handed over as themselves. */ private compositionHost; } //# sourceMappingURL=server-analyzer.d.ts.map