Computed class properties (#4500)
* Support computed class property names (#4499) ** Depends on babel/babylon#121 ** * `babel-types`: Add `computed` field to `ClassProperty` * `babel-plugin-transform-class-properties`: handle computed property names correctly * `babel-generator`: add tests for class properties (computed/literal, static/instance) * doc: Update babel-types with ClassProperty.computed * chore(package): update babylon to v6.11.0 * babel-types: move ClassProperty.computed to be last builder arg
This commit is contained in:
committed by
Daniel Tschinder
parent
a81a0d0f84
commit
03d772c2ec
@@ -0,0 +1,3 @@
|
||||
class Foo {
|
||||
[bar] = "foo";
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
var Foo = function Foo() {
|
||||
babelHelpers.classCallCheck(this, Foo);
|
||||
this[bar] = "foo";
|
||||
};
|
||||
Reference in New Issue
Block a user