mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
To support the need to resolve symbols without full AST access (e.g. when using virtual files), this commit decouples `ReferenceSymbol` from `ts.ClassDeclaration`. Changes: - Updated `ReferenceSymbol.target` to use `SymbolReference` instead of `ts.ClassDeclaration`. - Removed `getReferenceTargetNode()` from `SymbolDirectiveMeta` and transitioned to `getSymbolReference()`. - Refactored `getTsSymbolOfReference` in `checker.ts` to handle `SymbolReference` and resolve it to a `ts.Symbol` using a position-optimized AST traversal. This avoids using the private `getTokenAtPosition` API and avoids full file scans by only traversing nodes containing the target position. |
||
|---|---|---|
| .. | ||
| linker | ||
| private | ||
| src | ||
| test | ||
| BUILD.bazel | ||
| esbuild.config.js | ||
| index.ts | ||
| package.json | ||
| tsconfig-test.json | ||
| tsconfig.json | ||