mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
* [static blocks] Do not inject new static fields after static code * Update fixtures * Less parentheses * Avoid temp variable * Preserve class name * Fix Babel 8 * Fix ts * fix ts again * harden new-target test * Fix old Babel 7 compat --------- Co-authored-by: Huáng Jùnliàng <[email protected]>
19 lines
365 B
JavaScript
19 lines
365 B
JavaScript
var _staticBlock;
|
|
class C {
|
|
static #_ = _staticBlock = () => ((/* before 1 */(() => {})()
|
|
/* after 1 */
|
|
/* before 2 */
|
|
), /* before this.foo */this.foo = 42
|
|
/* after this.foo */
|
|
|
|
/* after 2 */
|
|
|
|
/* before 3 */, ((() => {
|
|
/* before this.bar */
|
|
this.bar = 42;
|
|
this.bar = 42;
|
|
/* after this.bar */
|
|
})() /* after 3 */));
|
|
}
|
|
_staticBlock();
|