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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Legacy Decorators + Generator Methods #9852
Comments
Hey @buschtoens! We really appreciate you taking the time to report an issue. The collaborators If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack |
We should update our parser to wycats/javascript-decorators@e240cbc, so that we also match TS's behavior. |
I never meddled with the Babel parser, but I would like to help implement this. Can you provide some pointers? |
I don't understand how stage 1 decorators can be recommended over stage 2 while this bug exists. It's a now default JS feature that isn't compatible but was fixed in stage 2. |
Bug Report
Current Behavior
Legacy decorators cannot decorate generator methods. An
Unexpected token
error is thrown:Input Code
REPL
Expected behavior/code
No error should be thrown and the method should be transpiled like normal methods.
Babel Configuration
Presets:
es2015
+stage-2
Decorators: legacy
Environment
Babel version(s): 7.4.3
Possible Solution
#8742
Additional context/Screenshots
#5704, babel/babylon#382
The text was updated successfully, but these errors were encountered: