-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[Bug]: Destructuring to a Super Field is not Supported yet. #13952
Comments
Hey @clhiker! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly. If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite. |
SWC's output is wrong: |
Hi 👋 ! Need help there? Let me know if I could help. ^^ |
As a workaround, you can enable the {
sourceType,
presets,
plugins,
assumptions: { constantSuper: true }
} |
@tony-go Yes! Do you have any idea about how it could be transpiled? |
Hi @JLHwung @nicolo-ribaudo :) Hope you're doing well and safe 🙌 ? I understand the intent of this code from a user's point of view. From a technical aspect, I understand that we have to look into the
It's all that I know, from my naive POV ahahaha. It's why I found that this issue could be a good challenge (with a bit of guidance) |
💻
How are you using Babel?
@babel/cli
Input code
Here is the Babel REPL
Configuration file name
babel.config.js
Configuration
Current and expected behavior
Current
I use babel to trans, get a SyntaxError:
Expected Behavior
The following ss5 compliant code is converted from SWC and can run correctly.
Environment
Possible solution
No response
Additional context
I run babel use cmd as follows
The text was updated successfully, but these errors were encountered: