Skip to content
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

Downlevel decorators to static fields without tsickle #1400

Closed
alexeagle opened this issue Sep 13, 2019 · 2 comments · Fixed by #1401
Closed

Downlevel decorators to static fields without tsickle #1400

alexeagle opened this issue Sep 13, 2019 · 2 comments · Fixed by #1401
Assignees

Comments

@alexeagle
Copy link

tsickle is intended to adapt TypeScript output to be valid Closure Compiler input.
One feature required is to downlevel decorators into static fields. We do it in a way that doesn't introduce Temporal Dead Zones.

Angular applications and libraries also downlevel decorators, so it was convenient to depend on the tsickle package for this. However it causes a bunch of support burden on tsickle, eg.
angular/tsickle#922
where a language feature isn't used with closure compiler, so tsickle team doesn't plan to fix these.

For Angular apps, we fixed this by porting the downleveling code from tsickle to the webpack loader in
angular/angular-cli#14473

We need to do something similar for ng-packagr so that Angular libraries can also be built without a tsickle dependency.

@alexeagle
Copy link
Author

Reading that angular-cli PR thread, it seems that angular/angular#30586 is the root cause - it would be better not to require the downleveling at all.

@alan-agius4 alan-agius4 self-assigned this Sep 13, 2019
alan-agius4 added a commit that referenced this issue Sep 13, 2019
With this change tsickle is no longer needed to be enabled by default. Previously it was needed to TDZ that was caused by forwardRef.

Closes: #1400
@github-actions
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.
This action has been performed automatically by a bot.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging a pull request may close this issue.

2 participants