Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Await in a class decorator is not properly transpiled #16481

Closed
1 task
nicolo-ribaudo opened this issue May 7, 2024 · 0 comments 路 Fixed by #16484
Closed
1 task

[Bug]: Await in a class decorator is not properly transpiled #16481

nicolo-ribaudo opened this issue May 7, 2024 · 0 comments 路 Fixed by #16484

Comments

@nicolo-ribaudo
Copy link
Member

馃捇

  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants