75afd80ae8
In Ivy, Angular decorators are compiled into static fields that are inserted into a class declaration in a TypeScript transform. When targeting Closure compiler such fields need to be annotated with `@nocollapse` to prevent them from being lifted from a static field into a variable, as that would prevent the Ivy runtime from being able to find the compiled definitions. Previously, there was a bug in TypeScript where synthetic comments added in a transform would not be emitted at all, so as a workaround a global regex-replace was done in the emit's `writeFile` callback that would add the `@nocollapse` annotation to all static Ivy definition fields. This approach is no longer possible when ngtsc is running as TypeScript plugin, as a plugin cannot control emit behavior. The workaround is no longer necessary, as synthetic comments are now properly emitted, likely as of https://github.com/microsoft/TypeScript/pull/22141 which has been released with TypeScript 2.8. This change is required for running ngtsc as TypeScript plugin in Bazel's `ts_library` rule, to move away from the custom `ngc_wrapped` approach. Resolves FW-1952 PR Close #35932 |
||
---|---|---|
.. | ||
animations | ||
bazel | ||
benchpress | ||
common | ||
compiler | ||
compiler-cli | ||
core | ||
docs | ||
elements | ||
examples | ||
forms | ||
http | ||
language-service | ||
localize | ||
platform-browser | ||
platform-browser-dynamic | ||
platform-server | ||
platform-webworker | ||
platform-webworker-dynamic | ||
private/testing | ||
router | ||
service-worker | ||
upgrade | ||
zone.js | ||
BUILD.bazel | ||
README.md | ||
circular-deps-test.conf.js | ||
empty.ts | ||
goog.d.ts | ||
license-banner.txt | ||
system.d.ts | ||
tsconfig-build-no-strict.json | ||
tsconfig-build.json | ||
tsconfig-test.json | ||
tsconfig.json | ||
types.d.ts |
README.md
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