angular/tools
Paul Gschwendtner 810b0a7e5c refactor: add explicit types for exports relying on inferred call return type (#61312)
As part of the Bazel toolchain migration we noticed that implicit types
generated by the TypeScript compiler sometimes end up referencing types
from other packages (i.e. cross-package imports).

These imports currently work just because the Bazel `ts_library` and
`ng_module` rules automatically inserted a `<amd-module
name="@angular/x" />` into `.d.ts` of packages. This helped TS figure
out how to import a given file. Notably this is custom logic that is not
occuring in vanilla TS or Angular compilations—so we will drop this
magic as part of the toolchain cleanup!

To improve code quality and keep the existing behavior working, we are
doing the following:

- adding a lint rule that reduces the risk of such imports breaking. The
  failure scenario without the rule is that API goldens show unexpected
  diffs, and types might be duplicated in a different package!

- keeping the `<amd-module` headers, but we manually insert them into
  the package entry-points. This should ensure we don't regress
  anywhere; while we also improved general safety around this above.

Long-term, isolated declarations or a lint rule from eslint-typescript
can make this even more robust.

PR Close #61312
2025-05-13 22:45:18 +00:00
..
bazel build: migrate symbol-extractor to ts_project (#61156) 2025-05-07 11:28:59 -07:00
contributing-stats refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
esm-interop build: prepare for compiler-cli to be using ts_project (#61181) 2025-05-09 15:59:46 +00:00
gulp-tasks refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
legacy-saucelabs refactor: replace fast-glob usage with tinyglobby (#60264) 2025-03-07 10:57:23 -08:00
manual_api_docs build: migrate manual_api_docs to rules_js (#61181) 2025-05-09 15:59:46 +00:00
npm-patches build: unpatch @angular/build (#60231) 2025-03-21 14:33:59 -07:00
saucelabs ci: remove circleci as we no longer rely on it (#58615) 2024-11-12 18:39:25 +00:00
saucelabs-daemon ci: remove circleci as we no longer rely on it (#58615) 2024-11-12 18:39:25 +00:00
symbol-extractor build: migrate symbol-extractor to ts_project (#61156) 2025-05-07 11:28:59 -07:00
testing test(router): This commit removes ZoneJS from the router tests (#61078) 2025-05-05 08:55:01 -07:00
tslint refactor: add explicit types for exports relying on inferred call return type (#61312) 2025-05-13 22:45:18 +00:00
BUILD.bazel build: migrate symbol-extractor to ts_project (#61156) 2025-05-07 11:28:59 -07:00
defaults.bzl build: migrate compiler-cli/src/ngtsc to ts_project (#61181) 2025-05-09 15:59:46 +00:00
defaults2.bzl build: migrate adev shared-docs package to use ts_project (#61193) 2025-05-09 16:30:05 +00:00
jsconfig.json chore(vscode): add jsconfig.json and remove .settings dir 2015-10-29 13:53:21 +00:00
ng_benchmark.bzl refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
postinstall-patches.js refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
tsconfig-test.json build: migrate symbol-extractor to ts_project (#61156) 2025-05-07 11:28:59 -07:00
tsconfig.json build: migrate manual_api_docs to rules_js (#61181) 2025-05-09 15:59:46 +00:00
types.d.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00