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]: Destructurisation transformation loses typescript types #14691
Comments
Hey @cainrus! 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. |
Out of curiosity, which tool/platform are you using that supports TS but not destructuring? |
I want to use it with assemblyscript, to downgrade some neat modern syntax features to compatible with assemblyscript syntax (partial es2015 support) |
Is this the only case which type is losing? |
Definitely a lot. I saw some more cases within my experiments (regenerated loops?) |
馃捇
How are you using Babel?
@babel/cli
Input code
Configuration file name
.babelrc.json
Configuration
Current and expected behavior
Current output:
Expected output:
Environment
System:
OS: macOS 12.2
Binaries:
Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
Yarn: 3.2.1 - /usr/local/bin/yarn
npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm
npmPackages:
@babel/cli: ^7.17.10 => 7.17.10
@babel/core: ^7.18.5 => 7.18.5
@babel/plugin-syntax-typescript: ^7.17.12 => 7.17.12
@babel/plugin-transform-destructuring: ^7.18.0 => 7.18.0
Possible solution
No response
Additional context
Reproduction repo
The text was updated successfully, but these errors were encountered: