angular/packages/compiler-cli/src/ngtsc
JoostK 89c589085d fix(ngcc): recognize enum declarations emitted in JavaScript (#36550)
An enum declaration in TypeScript code will be emitted into JavaScript
as a regular variable declaration, with the enum members being declared
inside an IIFE. For ngcc to support interpreting such variable
declarations as enum declarations with its members, ngcc needs to
recognize the enum declaration emit structure and extract all member
from the statements in the IIFE.

This commit extends the `ConcreteDeclaration` structure in the
`ReflectionHost` abstraction to be able to capture the enum members
on a variable declaration, as a substitute for the original
`ts.EnumDeclaration` as it existed in TypeScript code. The static
interpreter has been extended to handle the extracted enum members
as it would have done for `ts.EnumDeclaration`.

Fixes #35584
Resolves FW-2069

PR Close #36550
2020-04-28 15:59:57 -07:00
..
annotations fix(compiler): normalize line endings in ICU expansions (#36741) 2020-04-28 12:22:40 -07:00
core fix(compiler): normalize line endings in ICU expansions (#36741) 2020-04-28 12:22:40 -07:00
cycles style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00
diagnostics style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00
entry_point style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00
file_system refactor(compiler): remove unused CachedFileSystem (#36687) 2020-04-17 16:33:48 -04:00
imports style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00
incremental style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00
indexer style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00
metadata style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00
modulewithproviders style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00
partial_evaluator fix(ngcc): recognize enum declarations emitted in JavaScript (#36550) 2020-04-28 15:59:57 -07:00
perf style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00
reflection fix(ngcc): recognize enum declarations emitted in JavaScript (#36550) 2020-04-28 15:59:57 -07:00
resource style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00
routing style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00
scope style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00
shims style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00
switch style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00
testing style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00
transform style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00
translator style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00
typecheck style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00
util style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00
program.ts style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00
tsc_plugin.ts style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00