You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A binding pattern without rest element can have a trailing comma #24628
$ cat in.ts
let a; [a,] = <any>[];
$ git rev-parse --short HEAD
7eaa78846e
$ gulp local
[...]
$ node built/local/tsc.js in.ts
in.ts:1:10 - error TS1013: A rest parameter or binding pattern may not have a trailing comma.
1 let a; [a,] = <any>[];
~
Looks like this was introduced in #22262. I'll submit a PR in a moment here.
Will anyone try to fix it? Windows update - crash + BSOD, skype update - crash, Typescript update - crash. Do you have testers for your own products? The worst QA in all over the world... And that is Microsoft.
Reacted by Jake Stanger
Reacted by Pavel Birukov , James D. Callahan III, Michael Loughry, Gitowiec, jaa1982, Linjie Ding, Alexander Kachkaev, Vedran Marsic, Kai, Guillaume and 4 more
Can this fix make it into into an earlier release, e.g., 2.9.2? We use Prettier and either we have to rip out all trailing commas or upset the TS compiler to update to 2.9.
Reacted by Andrew Boyton, Huy Nguyen, avin-shum and Erin Hoops
As a workaround for anyone who stumbles into this issue, you can just append // prettier-ignore to an offending line and Prettier will not add a trailing comma there to satisfy TS.
Reacted by Andrew Boyton, Bohdan Khodakivskyi and avin-shum
Activity
mhegazy commentedon Jun 4, 2018
PRs welcomed.
mhegazy commentedon Jun 4, 2018
thanks @alexandrLamdan1995
bakkot commentedon Jun 4, 2018
Mohamed Hegazy (@mhegazy) I'm still seeing this on master:
Looks like this was introduced in #22262. I'll submit a PR in a moment here.
tarhunakau commentedon Jun 5, 2018
Will anyone try to fix it? Windows update - crash + BSOD, skype update - crash, Typescript update - crash. Do you have testers for your own products? The worst QA in all over the world... And that is Microsoft.
j-f1 commentedon Jun 5, 2018
It’ll be fixed by #24672 @BLRplex.
tarhunakau commentedon Jun 5, 2018
Jed Fox (@j-f1) Hope it will not reopened again in few days. Thanks
vaskevich commentedon Jun 8, 2018
Can this fix make it into into an earlier release, e.g., 2.9.2? We use Prettier and either we have to rip out all trailing commas or upset the TS compiler to update to 2.9.
vaskevich commentedon Jun 8, 2018
As a workaround for anyone who stumbles into this issue, you can just append
// prettier-ignoreto an offending line and Prettier will not add a trailing comma there to satisfy TS.workaround for TypeScript trailing comma bug
workaround for TypeScript trailing comma bug
Avoid TypeScript to 2.9 due to microsoft/TypeScript#24628
Avoid TypeScript to 2.9 due to microsoft/TypeScript#24628
Avoid TypeScript to 2.9 due to microsoft/TypeScript#24628