Skip to content

feat(@angular-devkit/build-optimizer): add support for es2015 enums e… #13495

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 22, 2019
Merged

feat(@angular-devkit/build-optimizer): add support for es2015 enums e… #13495

merged 1 commit into from
Jan 22, 2019

Conversation

alan-agius4
Copy link
Collaborator

…mitted by tsickle

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

@alan-agius4 alan-agius4 added the target: major This PR is targeted for the next major release label Jan 22, 2019
…mitted by tsickle

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
@filipesilva filipesilva requested a review from clydin January 22, 2019 14:40
@mgechev mgechev merged commit 7d86894 into angular:master Jan 22, 2019
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize ES2015 enums
5 participants