-
Notifications
You must be signed in to change notification settings - Fork 109
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
tsickle should emit goog.reflect.objectProperty for property names passed to __rest tslib helper #1047
Comments
To hook this, I think we'd need to postprocess the JS output to look for calls to |
Alternatively can tsickle just emit the same code? Why is it lowering the language level? |
theseanl
added a commit
to theseanl/tscc
that referenced
this issue
Sep 25, 2019
Typescript when target is less than ES2018 emits `__rest` helper for object spread syntax, which references properties' name via string literal hence breaks Closure Compilation. We transforms such names to appropriate `goog.reflect.objectProperty` calls to make it compatible with Closure Compiler, as described in angular/tsickle#1047.
theseanl
added a commit
to theseanl/tscc
that referenced
this issue
Sep 25, 2019
Typescript when target is less than ES2018 emits `__rest` helper for object spread syntax, which references properties' name via string literal hence breaks Closure Compilation. We transforms such names to appropriate `goog.reflect.objectProperty` calls to make it compatible with Closure Compiler, as described in angular/tsickle#1047.
Internal issue created http://b/171341422 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rest destructuring assignments are not safe for closure compiler because tsc/tsickle emits property names as quoted strings. It looks like it should be pretty simple to apply
goog.reflect.objectProperty
hereExample Input:
Current Emit:
Proposed Emit:
Related: #241
This probably applies to other emit too
The text was updated successfully, but these errors were encountered: