-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
refactor: improve tsc diagnostics #7420
Conversation
I really don't want to get into an ad nauseam debate, so I will simply revert the stylistic change. |
@bartlomieju finally have the first part of many, took me longer than I thought. It adds 118 lines (of non test code) to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you @kitsonk
This PR removes a significant amount of logic around TypeScript diagnostics out of the compiler and moves it Rust. Also, it refactors the diagnostics in Rust to be self-contained and more align to idiomatic Rust using
fmt
.There is one stylistic change, in that when displaying a line of code, there is a blank line between the message and the code, which makes the message more readable.JSError can be refactored to align and further improve the Rust side as a seperate PR.