tsickle emits es2015 enums with an object literal followed by an export declaration
Example:
```
const RendererStyleFlags3 = {
Important: 1,
DashCase: 2,
};
export { RendererStyleFlags3 };
RendererStyleFlags3[RendererStyleFlags3.Important] = 'Important';
RendererStyleFlags3[RendererStyleFlags3.DashCase] = 'DashCase';
```
This PR adds support for the enums to be optimized by wrapping them in an iife and marks them as pure.
Fixes#13488
Although ES5 classes had their static properties folded in, ES2015 ones did not.
This PR adds that new functionality.
It should also make this particular transform a bit faster since it will stop early.
Fix https://github.com/angular/angular-cli/issues/13487
Build optimizer was broken for non-FESM files inside @angular/core because it couldn't identify relative imports were still inside core.
This change adds a known list of angular core files as a default, and also allows passing in a override.
Module concatenation may rename classes with the same name. The renaming logic is specific to the bundler so we can't really foresee it.
But the fact remains that the inner function declaration doesn't need to have the same name as the outer one.
* refactor: fix `import` and `export` paths to work with classic resolution
`ts-api-guardian` only support classic module resolution which means that we need to specify `index` so that the resolution works.
* build: add `npm_package` to packages
* build: add ts-api-guardian to repo
* test: add api golden files
* refactor: use proper namespace instead of alias export
* refactor: use proper namspace einstead of alias export
* build: add `_golden_api` files
At the moment ts api guardian doesn't support aliased symbols as namespaces, this is a workaround to still have namespaced symbols in the final golden file.
* build: update angular archive for workspace
* test: fix reference to `TestHost` to use namespace
* refactor: create `fs` namespace instead of aliased export
* test: update api golden file for `@angular-devkit/core/node`
This commit updates the BUILD files to specify fine-grained node_module deps
by replacing "@typings" comments with actual @npm node module.
Moved tools/bazel.rc -> .bazelrc
Removed "jasmine" typings from base tsconfig.json
Added @bazel/karma to devDependencies, needed for `ts_web_test`
This should clean up the code a bit.
Note: at first I added the no-useless-cast rule, but after getting frustrated
with it (as it has many false positive), I decided to remove the rule but some
useless casts were removed so I let those in the PR.