nl7
nl7
DDeno
Created by nl7 on 10/17/2024 in #help
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.
3 replies