Closed ayame113 closed 3 years ago
I think we were discussing this in https://github.com/atom-community/atom-languageclient/pull/132#discussion_r595580845
I'm not sure if it is better to throw an error if the lsp returns something invalid or fail silently like this PR. Is null or undefined a valid return for .codeAction
?
I think we were discussing this in #132 (comment)
This is different though.
This is different though.
How? Why are these checks necessary if null
or undefined
are not correct outputs of .codeAction
anyway?
If null
or undefined
are valid outputs then we should change the types to reflect that.
I meant the changes under lib/languageclient.ts
which seem reasonable as they are using the original types.
I meant the changes under
lib/languageclient.ts
which seem reasonable as they are using the original types.
Ya I think those changes are good. I'm just not sure about null checks.
(some comment)
vscode-languageserver-protocol
module is used for type definition. In this PR, I also want to use it in the return value of the language-client method.
I'll review today or tomorrow
:tada: This PR is included in version 1.8.3 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Some LSP requests lack null checking and are causing errors, so I fixed them.
I made the following changes:
If you don't need the third change, reverting it will still work.