-
Notifications
You must be signed in to change notification settings - Fork 38
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
global-assignment-to-default-export
should allow prototype assignments
#138
Comments
global-assignment-to-default-export
shouldn't prevent prototype assignmentsglobal-assignment-to-default-export
should allow prototype assignments
Another possibility here is just translating them to class instance properties, but getting |
Still around after the decaf merge? |
Yep, still around. I have a transform-based workaround in a branch somewhere, but I think we can finesse some problems away with a minor decaf change. Class name should be unique, so we should be able to strip out the i.e., instead of outputting Shopify.Foo = class Foo {};
Shopify.Foo.prototype.bar = 'bar'; it should produce Shopify.Foo = class Foo();
Foo.prototype.bar = 'bar'; ^ That should be safe, even in mainline decaf. |
I'll dig out the branch with the transform fix and submit as a PR this morning. |
Fixed by #172. |
This is currently prevented, but think it's necessary to fully transform Coffee class properties.
Should be allowed to translate to:
The text was updated successfully, but these errors were encountered: