yoavbls / pretty-ts-errors

🔵 Make TypeScript errors prettier and human-readable in VSCode 🎀
https://marketplace.visualstudio.com/items?itemName=yoavbls.pretty-ts-errors
MIT License
13.14k stars 89 forks source link

`ts(1378)` is parsed incorrectly #73

Closed mybearworld closed 10 months ago

mybearworld commented 11 months ago

Describe the bug ts(1378) is not handling the use of multiple single quotes correctly, putting all of the code instances into a single block, plus text in between.

Expected behavior

I'd expect the message to look something like:

Top level await expressions are only allowed when the module option is set to es2022, esnext, [...] or nodenext, and the target option is set to es2017 or higher.

Original error

Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.ts(1378)

Screenshots

A demo of the behavior in "Describe the bug"