-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
Spec: Class Static Blockarea: errorsarea: typescripti: regressionoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issuepkg: parser
Description
💻
- Would you like to work on a fix?
How are you using Babel?
Other (Next.js, Gatsby, vue-cli, ...)
Input code
class Foo {
static {}
}
Configuration file name
No response
Configuration
Use classStaticBlock
and typescript
plugin.
const { parse } = require("@babel/parser");
const code =`class Foo {
static {}
}`;
const result = parse(code, {
sourceType: "module",
errorRecovery: true,
plugins: ["classStaticBlock", "typescript"],
});
Current and expected behavior
current:
SyntaxError: Unexpected token
expected:
no error
Environment
@babel/parser
7.14.0
Possible solution
No response
Additional context
JounQin
Metadata
Metadata
Assignees
Labels
Spec: Class Static Blockarea: errorsarea: typescripti: regressionoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issuepkg: parser