angular-cn/packages/language-service
Alex Rickabaugh bb6e5e2dd0 fix(language-service): don't show external template diagnostics in ts files (#41070)
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
2021-03-03 21:40:50 +00:00
..
bundles fix(language-service): use single entry point for Ivy and View Engine (#40967) 2021-02-24 15:05:44 -08:00
ivy fix(language-service): don't show external template diagnostics in ts files (#41070) 2021-03-03 21:40:50 +00:00
src fix(compiler): allow binding to autocomplete property on select and textarea elements (#40928) 2021-03-03 10:00:27 -08:00
test fix(language-service): Paths on Windows should be normalized (#40492) 2021-01-20 08:46:03 -08:00
BUILD.bazel fix(language-service): use single entry point for Ivy and View Engine (#40967) 2021-02-24 15:05:44 -08:00
api.ts fix(language-service): Add plugin option to force strictTemplates (#41062) 2021-03-03 09:48:06 -08:00
build.sh build(language-service): install @angular/language-service in root node_modules (#40058) 2020-12-10 13:48:04 -08:00
index.ts fix(language-service): Add plugin option to force strictTemplates (#41062) 2021-03-03 09:48:06 -08:00
package.json fix(language-service): use single entry point for Ivy and View Engine (#40967) 2021-02-24 15:05:44 -08:00