8d0de89ece
When compiling an Angular decorator (e.g. Directive), @angular/compiler generates an 'expression' to be added as a static definition field on the class, a 'type' which will be added for that field to the .d.ts file, and a statement adjacent to the class that calls `setClassMetadata()`. Previously, the same WrappedNodeExpr of the class' ts.Identifier was used within each of this situations. In the ngtsc case, this is proper. In the ngcc case, if the class being compiled is within an ES5 IIFE, the outer name of the class may have changed. Thus, the class has both an inner and outer name. The outer name should continue to be used elsewhere in the compiler and in 'type'. The 'expression' will live within the IIFE, the `internalType` should be used. The adjacent statement will also live within the IIFE, the `adjacentType` should be used. This commit introduces `ReflectionHost.getInternalNameOfClass()` and `ReflectionHost.getAdjacentNameOfClass()`, which the compiler can use to query for the correct name to use. PR Close #33533 |
||
---|---|---|
.. | ||
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 | ||
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.
License: MIT