-
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(lsp): clean up tsc requests #20743
Conversation
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.
Looking good, but we should probably call the higher level functions of TsServer
in the tests so that we're actually testing that struct.
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. Nice cleanup!
We have two useless intermediate representation of requests between the
TsServer::<method>()
args and the typescriptlanguageService[method]()
args. Namely theRequestMethod
enum and the 'serializations' returned byRequestMethod::to_value()
, which still need to be parsed into the final TS API args. The latter also has type declarations incompiler.d.ts
.So there are 4 different places in our tsc abstraction layer that need to be changed if I wanted to, say, add a new workspace setting and pass that into TSC.
This reduces that to 1. Now things like the specifier denormalization and normalization are near each other, and located at each respective
TsServer
method.