Tan Li Hau b4c9cb0222 Fixed computed keys for class expression (#10029)
* test case for insertBefore for jsx

* fix unshiftContainer and insertBefore

* use path.scope.push

* add test making sure computedKeys var declaration at the right block

* add comment

* nit [skip ci]
2019-05-28 23:07:55 +02:00

24 lines
519 B
JavaScript

const classes = [];
for (let i = 0; i <= 10; ++i) {
var _class, _temp, _bar;
let _i;
classes.push((_temp = (_i = i, _class = class A {
constructor() {
babelHelpers.defineProperty(this, _i, `computed field ${i}`);
_bar.set(this, {
writable: true,
value: `private field ${i}`
});
}
getBar() {
return babelHelpers.classPrivateFieldGet(this, _bar);
}
}), _bar = new WeakMap(), babelHelpers.defineProperty(_class, "foo", `static field ${i}`), _temp));
}