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.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| bin | ||
| ngtsc | ||
| transformers | ||
| extract_i18n.ts | ||
| main.ts | ||
| perform_compile.ts | ||
| perform_watch.ts | ||
| typescript_support.ts | ||
| version.ts | ||
| version_helpers.ts | ||