-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Richer Diagnostic Display Meta-Issue #41860
Copy link
Copy link
Open
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureDomain: Error MessagesThe issue relates to error messagingThe issue relates to error messagingSuggestionAn idea for TypeScriptAn idea for TypeScript
Metadata
Metadata
Assignees
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureDomain: Error MessagesThe issue relates to error messagingThe issue relates to error messagingSuggestionAn idea for TypeScriptAn idea for TypeScript
This issue tracks a couple of different useful ideas for making diagnostics "richer" for display purposes. We've wanted some of these for a while, and they're partially inspired by testing tools like Jest and Mocha. We've also seen tools like Rust, Rome, and Flow prove them out to some extent.
Long-term, you could imagine them being interactive with the a richer compiler client.
Printing Messages Across Lines
Types can get unwieldy, and displaying them inline makes it harder to see where things begin/end.
Notice no punctuation at the end. Not sure if we can generalize messages that way.
Also not sure how this plays well with
Highlighted Spans in Messages
Imagine being able to highlight individual sections inside of types to indicate where the issue occurs.
Diff Highlighting in Messages
Basically imagine red being the provided color, with green being an expected color.
Type '[string, number, boolean]' is not assignable to type '[string, string, boolean]'. ^^^^^^ ^^^^^^ rrrrrr gggggg