Get the latest tech news
Building a better online editor for TypeScript
Updates and articles from the Val Town team
We didn't have that luxury, and often referencing an NPM module would trigger an avalanche of HTTP requests and bytes downloaded, which would overload the Web Worker and make the editor's language tools unresponsive. The LSP specification is quite sprawling – there are many fun features to support, like code actions (buttons such as "infer return type") and method suggestions (that pop up as you call functions). When you want to connect to a Val Town language server, you simply hit our Cloudflare worker with a signed cookie containing your user ID, which routes you directly to a already-running, or brand-new durable object/container that boots your LSP.
Or read this on Hacker News