sourcegraph-typescript
sourcegraph-typescript copied to clipboard
External references are not always found if project did not finish loading yet
There is currently no way for the backend to know when tsserver finished loading a project. Therefor references results often come back empty.
A solution to this would be to subclass the TypeScript langserver and interact with tsserver directly to get access to the tsserver events and requests for loading projects:
https://sourcegraph.com/github.com/Microsoft/TypeScript@b8def16e92f609327971f07232757fa6c7d29a56/-/blob/src/server/protocol.ts#L1430-1436
https://sourcegraph.com/github.com/Microsoft/TypeScript@b8def16e92f609327971f07232757fa6c7d29a56/-/blob/src/server/protocol.ts#L2459-2463