nl7
nl713h ago

Deno + TSServer weirdness

I'm new to Deno and have had a frustrating introduction to Deno. When I would import libraries into my Deno project, any nested types that weren't explicitly imported lost their typing, resulting in an any type. This ended up only applying to a small portion of my code, but it was enough to drive me nuts. To be more specific, I'm building a Hono app to deploy on Deno Deploy, and the context parameter is showing up as any type. I had a hunch that maybe Deno LSP & TSServer were interacting in some way and decided to disable TSServer, and the correct type showed up! I was able to get types working correctly without completely disabling TSServer by adding "typescript.disableAutomaticTypeAcquisition": true, to my deno.json file. I'm not sure if other people are going through this or not but I found this to be a very frustrating experience. I think the docs need to be updated. The interaction between Deno LSP & TSServer is probably going to bite some users and this is not show up on any telemetry collected from users.
2 Replies
marvinh.
marvinh.12h ago
Hey, thanks for trying out Deno. Rest assured we're very aware of these issues with our LSP interacting with the built-in tsserver in vscode. It's something we're keen to work on now that Deno 2 is out.
nl7
nl712h ago
Ok great, I just wanted to make sure you guys were aware of the issue. I didn't know if this was solely an issue on my end due to me not having a ton of experience with Typescript configuration. I hope my feedback was constructive.