fix jsdoc errors in .ts in tsserver#54185
Conversation
when requesting diagnostics *after* a different services command. There are two fixes, and though they probably don't address every possible error that could appear in JSDoc, they should at least improve the problem substantially. Fixes microsoft#50341 I need to check whether it helps microsoft#49109 as well.
| import { baselineTsserverLogs, createLoggerWithInMemoryLogs, createSession } from "../helpers/tsserver"; | ||
| import { createServerHost, File } from "../helpers/virtualFileSystemWithWatch"; | ||
|
|
||
| describe("unittests:: services:: goToDefinition", () => { |
There was a problem hiding this comment.
fourslash no longer supports the methods needed to make the diagnostic call out-of-order, so I think this is better as a unit test, especially since the answer might turn out to be "don't make ooorder calls".
There was a problem hiding this comment.
I feel like we should try as much as possible to make sure that things work no matter the order; it may be the case that VS Code does it a certain way but I think it's super likely that some other client will do it that way. I know that in LSP, these orders are totally possible.
| @@ -0,0 +1,140 @@ | |||
| import { protocol } from "../../_namespaces/ts.server"; | |||
There was a problem hiding this comment.
Can you move this file to unittests/tsserver instead.. All the tests throgh tsserver are in there.
There was a problem hiding this comment.
I copied findAllReferences in this same directory. Should I move that one too?
when requesting diagnostics after a different services command.
There are two fixes, and though they probably don't address every possible error that could appear in JSDoc, they should at least improve the problem substantially. However, I don't actually know if the scenario makes sense. Is it required that diagnostics be requested before other services work reliably? If so, the fix is to figure out why the language service is getting ooorder calls instead. (And document the requirement in the API so others know it too.)
Fixes #50341
Fixes #49109