-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
Colour coded error messages #50019
Comments
A small types highlighter is something I've been thinking about for the twoslash hovers in the site ( shikijs/twoslash#159 ) which could perhaps feed two birds with one feeder. |
Any updates on this? Especially when working with a lot of generics or simply complex types, the error messages are very hard to read and this change would help a lot |
This VS Code plugin came to rescue: |
Suggestion
Typescript error messages can be a bit verbose sometimes. Color coding them and formatting them better (in reference to #45896) would greatly improve their readabillity.
🔍 Search Terms
Colour code, color code, syntax highlighting, formatter, error messages
✅ Viability Checklist
My suggestion meets these guidelines:
⭐ Suggestion
A plus:
Colour coded visual difference for type errors, for example when unions do not match or a required property is missing.
📃 Motivating Example
Images speak a thousand lines of code (I messed up the formatting a bit. I did this by hand in an online tool..)
![big output](https://user-images.githubusercontent.com/28539403/180614651-a07c5364-4ac7-49f3-abf1-ac39308324b3.png)
![difference](https://user-images.githubusercontent.com/28539403/180614762-4b96ae0e-82f9-4d31-9070-932dfbb0af41.png)
💻 Use Cases
Overall useful as current error messages are hard to read, especially with big complex types.
The text was updated successfully, but these errors were encountered: