Support class-static-block proposal (#9476)

* Support class-static-block proposal

* Update changelog
This commit is contained in:
Sosuke Suzuki authored and GitHub committed 2020-10-23 20:09:07 +09:00
1 parent d9f5630ff5
commit 13f3336bba
9 files changed
+172 -4

No files matched your search

+17 -1
View File
@@ -1,4 +1,4 @@
#### Update to `@babel/parser` 7.12 (#9408 by @sosukesuzuki)
#### Update to `@babel/parser` 7.12 (#9408, #9476 by @sosukesuzuki)
Updated the JavaScript parser to [`@babel/parser` 7.12](https://babeljs.io/blog/2020/10/15/7.12.0). This fixes several bugs and supports some new syntax.
@@ -20,3 +20,19 @@ Due to a [bug in `@babel/parser`](https://github.com/babel/babel/issues/12209),
let happy = "happy";
export { happy as "😃" };
```
##### Support class static blocks
```js
class C {
static #x = 42;
static y;
static {
try {
this.y = doSomethingWith(this.#x);
} catch {
this.y = "unknown";
}
}
}
```