Parse class static block (#12079)
Co-authored-by: Brian Ng <bng412@gmail.com>
This commit is contained in:
committed by
Nicolò Ribaudo
parent
6830c90ac9
commit
3ccca88178
@@ -1183,7 +1183,7 @@ interface Class <: Node {
|
||||
```js
|
||||
interface ClassBody <: Node {
|
||||
type: "ClassBody";
|
||||
body: [ ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty ];
|
||||
body: [ ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty | StaticBlock ];
|
||||
}
|
||||
```
|
||||
|
||||
@@ -1235,6 +1235,17 @@ interface ClassPrivateProperty <: Node {
|
||||
}
|
||||
```
|
||||
|
||||
## StaticBlock
|
||||
|
||||
```js
|
||||
interface StaticBlock <: Node {
|
||||
type: "StaticBlock";
|
||||
body: [ Statement ];
|
||||
}
|
||||
```
|
||||
|
||||
A static block proposed in https://github.com/tc39/proposal-class-static-block.
|
||||
|
||||
## ClassDeclaration
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user