bb6e5e2dd0
The compiler considers template diagnostics to "belong" to the source file of the component using the template. This means that when diagnostics for a source file are reported, it returns diagnostics of TS structures in the actual source file, diagnostics for any inline templates, and diagnostics of any external templates. The Language Service uses a different model, and wants to show template diagnostics in the actual .html file. Thus, it's not necessary (and in fact incorrect) to include such diagnostics for the actual .ts file as well. Doing this currently causes a bug where external diagnostics appear in the TS file with "random" source spans. This commit changes the Language Service to filter the set of diagnostics returned by the compiler and only include those diagnostics with spans actually within the .ts file itself. Fixes #41032 PR Close #41070
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