-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Syntax errors caused by JS file #18306
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
Comments
Those errors would be disappeared if I refomat code compressed in a.min.js. |
your tsconfig.json has so either 1. do not use |
Also can you share the section of the .js file that is causing the errrors? looks like we have a parser error we need to fix. |
@mhegazy |
@sandersn looks like another lambda/ternary parsing issue. |
Still repros on master/2.5.3. I'll take a look. |
#18294 fixes this. Interestingly, this is not a dupe of #18158. Bisecting tracked down d796bf1 as the buggy commit, a couple of weeks after the commits that caused #18158. @Aqours did you try this code on older versions of Typescript to see if it also fails? I am very suspicious that two people hit 3-year-old bugs within two weeks right after I made parsing changes in the last version. |
Here's a small repro that I believe still has the essential parse failure: {L:function(a){ return true ? (a/8) : true },ka:function(
){},
}; |
@sandersn
|
#18417 is a better fix than #18294 that works by requiring speculatively parsed arrow functions to have an |
Uh oh!
There was an error while loading. Please reload this page.
TypeScript Version: 2.5.2
** example code **
tsconfig.json
There 34 Syntax errors caused by JS file when compile TS file(use
tsc
command) without module bundler. Actually, those errors should not be hinted by TS.The text was updated successfully, but these errors were encountered: