angular/packages
Alex Rickabaugh 9322e6a076 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:51 +00:00
..
animations fix(animations): error when setting position before starting animation (#28255) 2021-02-19 12:09:02 -08:00
bazel refactor(bazel): use readConfiguration to read config file (#40694) (#41036) 2021-03-01 15:40:08 -08:00
benchpress fix(dev-infra): update type castings for JSON.parse usage (#40710) 2021-02-09 10:48:46 -08:00
common docs: rewrite structural-directives.md (#40015) 2021-03-01 15:32:27 -08:00
compiler fix(language-service): Always attempt HTML AST to template AST conversion for LS (#41068) 2021-03-03 21:13:59 +00:00
compiler-cli fix(language-service): Always attempt HTML AST to template AST conversion for LS (#41068) 2021-03-03 21:13:59 +00:00
core refactor(compiler): remove unreachable code (#40984) 2021-03-01 15:29:20 -08:00
docs docs(di): fix typo in advanced di doc (#36634) 2020-05-01 09:50:28 -07:00
elements fix(elements): update type castings for JSON.parse usage (#40710) 2021-02-09 10:48:46 -08:00
examples docs: improve description, examples of DecimalPipe's digitsInfo parameter (#40714) 2021-02-26 15:42:29 -08:00
forms docs(forms): add array example to get method (#41008) 2021-02-26 08:24:22 -08:00
language-service fix(language-service): don't show external template diagnostics in ts files (#41070) 2021-03-03 21:40:51 +00:00
localize test(localize): ensure tests pass on Windows (#40952) 2021-02-24 14:27:08 -08:00
misc/angular-in-memory-web-api docs: remove duplicated the (#40434) 2021-01-14 11:33:57 -08:00
platform-browser refactor(platform-browser): cast response of JSON.parse (#41020) 2021-03-01 15:48:24 -08:00
platform-browser-dynamic docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
platform-server build: support building with TypeScript 4.1 (#39571) 2020-11-25 11:10:01 -08:00
private/testing build: update .bazelversion (#40579) 2021-01-26 11:35:54 -08:00
router fix(router): fix load interaction of navigation and preload strategies (#40389) 2021-02-16 11:28:50 -08:00
service-worker fix(service-worker): update type castings for JSON.parse usage (#40710) 2021-02-09 10:48:45 -08:00
upgrade fix(upgrade): fix HMR for hybrid applications (#40045) 2020-12-10 13:40:53 -08:00
zone.js docs: update year (#40925) 2021-02-22 12:37:40 -08:00
BUILD.bazel build: replace @types/trusted-types dep with minimal type defs (#39211) 2020-10-15 09:08:00 -07:00
circular-deps-test.conf.js fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic (#38846) 2020-09-30 09:13:59 -04:00
empty.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
goog.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
license-banner.txt docs: update year (#40925) 2021-02-22 12:37:40 -08:00
README.md docs: add doc reference to npm package readme (#33911) 2019-11-20 14:46:23 -08:00
system.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
tsconfig-build-no-strict.json refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00
tsconfig-build.json refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00
tsconfig-test.json refactor: fix typescript strict flag failures in all tests (#30993) 2019-07-18 14:21:26 -07:00
tsconfig.json fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic (#38846) 2020-09-30 09:13:59 -04:00
types.d.ts build: replace @types/trusted-types dep with minimal type defs (#39211) 2020-10-15 09:08:00 -07:00

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