typescript-go icon indicating copy to clipboard operation
typescript-go copied to clipboard

API over LSP implementation

Open aleksei-berezkin opened this issue 2 weeks ago • 3 comments

Hi! This is our attempt to implement a TS-Go API over the LSP protocol using custom messages. We are already actively using it to query types from the tsgo server, so we think it could be of interest to you. Here are the key points of this implementation:

  • It uses LSP as the transport layer rather than a custom protocol. We find this much easier to maintain. In terms of performance, the transport has never been a bottleneck for us.
  • Types and Symbols are loaded lazily. For example, for an ObjectType, properties are loaded only when accessed, and their types are also requested on demand. This helps minimize traffic and maintain good performance.
  • While this code is fully functional, we understand that the implementation is not complete. Only a subset of fields and types is supported, but we believe it can be developed further into a production-ready solution.

Thank you.

aleksei-berezkin avatar Dec 09 '25 10:12 aleksei-berezkin

@microsoft-github-policy-service agree company="JetBrains"

aleksei-berezkin avatar Dec 09 '25 10:12 aleksei-berezkin

@aleksei-berezkin the command you issued was incorrect. Please try again.

Examples are:

@microsoft-github-policy-service agree

and

@microsoft-github-policy-service agree company="your company"

@microsoft-github-policy-service agree company="JetBrains"

aleksei-berezkin avatar Dec 09 '25 11:12 aleksei-berezkin