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
@babel/types 7.12.11 causes syntax error on TypeScript 3.2.4 #12519
Comments
Hey @miestr! 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." |
Thank you for your reply! I am using typescript version 3.2.4, as mentioned
in the description.
чт, 17 дек. 2020 г. в 12:12, Nicolò Ribaudo <notifications@github.com>:
… Thanks for the bug report! It's the second like this we get, but I cannot
reproduce it on the TS playground with any TS version >= 3.7 ( and for
older versions we provide a different dts file).
What tsc version are you using?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12519 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFOS6NEJQLR3I3KLT3WJ3PDSVHRSFANCNFSM4U7KMTPA>
.
|
(I deleted my reply as soon as I posted it because I noticed you already mentioned it 😅) We specify |
I think typeVersions does not work on legacy typescript versions. There was the reason why we specified >3.7 before 7.12.11. |
IIRC ts@3.2's support for |
I have a fix for this, I will open a PR when I get home later (the code is already there, but I just turned off the PC 😛). I was surprised because typesVersions has been introduced in 3.1, and the OP is using 3.2. |
This comment has been minimized.
This comment has been minimized.
@salvoravida I cannot imagine working on a project using ts@3.2 without lock files. It could break at any second due to |
@salvoravida Every time you comment in this repository you do so sarcastically, pretending we owe you something (hint: we do not!). Unless you want to be collaborative, you are not welcome to interact in this repository. PS. I already recommended you to use lockfiles. |
It might sound silly, but as soon as I reformatted the index.d.ts file and the function declarations broke into multiple lines, |
As another workaround until we release a fix, you can copy the contents of |
Guys you saved me today! Had a similar error cause by typescript 3.4.5 and @bable/types. Thanks |
Bug Report
Current behavior
I use babel in a react application. When trying to produce a build (yarn run build), it fails with error code:
TypeScript error in /var/jenkins/.../node_modules/@babel/types/lib/index.d.ts(1450,50):
'{' or ';' expected. TS1144
As a current fix I declared a yarn resolution to use version 7.12.10, which compiles without any issues.
The text was updated successfully, but these errors were encountered: