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

Fix rewriteThis in helper-module-transforms for computed class elements #11109

Merged
merged 13 commits into from Feb 12, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/babel-helper-module-transforms/src/rewrite-this.js
Expand Up @@ -17,6 +17,11 @@ const rewriteThisVisitor = {
ClassProperty(path) {
path.skip();
sidntrivedi012 marked this conversation as resolved.
Show resolved Hide resolved
},
ClassMethod(path) {
if (path.node.computed) {
//requeue the key child of classProperty here
}
sidntrivedi012 marked this conversation as resolved.
Show resolved Hide resolved
},
ClassPrivateProperty(path) {
path.skip();
},
Expand Down
@@ -0,0 +1 @@
export class C { [this.name] = 42 }
sidntrivedi012 marked this conversation as resolved.
Show resolved Hide resolved
@@ -0,0 +1,7 @@
{
"plugins": [
"external-helpers",
"transform-modules-commonjs",
"@babel/plugin-proposal-class-properties"
]
}