xsburg / vscode-javascript-booster

Sprinkle extra refactorings, code actions and commands over your JavaScript! 🍩 TypeScript and Flow are first class citizens as well!
https://marketplace.visualstudio.com/items?itemName=sburg.vscode-javascript-booster
159 stars 13 forks source link

[BUG]: Fails to parse files that contain a Named Touple #38

Open KilianKilmister opened 4 years ago

KilianKilmister commented 4 years ago

I was wondering Why the extention stopped offering code actions in files as they grew. Türnes out, newer typescript features can cause booster to report a syntax error and stop working.

I don't know if there are other TSv4+ features affected, but the one i discovered was the Named Touple:

type SomeType = [first: number, second: number]

Link to official Playground sample

Heres the log output of me removing and re-adding a named touple:

2020-09-24T22:47:23.939Z: Running in production mode.
2020-09-24T22:47:24.719Z: 35 code actions loaded.
2020-09-24T22:47:38.030Z: Syntax error in file file:///<path-to-project>/src/stage.ts (37:47).
2020-09-24T22:49:19.710Z: File now valid: file:///<path-to-project>/src/stage.ts.
2020-09-24T22:49:40.511Z: Syntax error in file file:///<path-to-project>/src/stage.ts (37:47).
2020-09-24T22:51:23.376Z: Syntax error in file file:///<path-to-project>/src/stage.ts (37:43).
2020-09-24T22:51:25.010Z: File now valid: file:///<path-to-project>/src/stage.ts.
2020-09-24T22:51:35.167Z: Syntax error in file file:///<path-to-project>/src/stage.ts (28:18).