-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[Bug]: Await in a class decorator is not properly transpiled #16481
Copy link
Copy link
Closed
Labels
Spec: DecoratorsoutdatedA 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 issue
Description
💻
- Would you like to work on a fix?
How are you using Babel?
Other (Next.js, Gatsby, vue-cli, ...)
Input code
@(await 1)
class A {}Configuration file name
No response
Configuration
decorators plugin on latest version
Current and expected behavior
It produces this code, but await in static blocks is not valid:
let _A;
class A {
static {
[_A, _initClass] = _applyDecs(this, [await 1], []).c;
}
static {
_initClass();
}
}Environment
/
Possible solution
No response
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Spec: DecoratorsoutdatedA 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 issue