mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
a19c02706f
Previously, extracting foreign component imports relied on the partial evaluator and semantic import resolution to locate declaration references across files. This resolver-based approach is incompatible with isolated declarations and local compilation, where cross-file type information and full semantic resolution are unavailable. Replace the resolver-based foreign import evaluation with a lightweight, AST-based extraction mechanism (`extractForeignImportsFromAst`). This allows the compiler to extract foreign component names and raw AST expressions directly from syntax trees during the analysis phase without requiring full type checking. Additionally, simplify the `ForeignComponentMeta` interface by removing the obsolete reference property and implement granular AST diagnostics that provide actionable error messages and usage examples when invalid expressions are passed to `foreignImports`.
Angular
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
Usage information and reference details can be found in Angular documentation.
License: MIT