DenoDDeno
Powered by
nl7N
Denoβ€’2y agoβ€’
2 replies
nl7

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,
"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.
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Nvim deno tsserver conflict
SmorSSmor / help
4y ago
Nvim tsserver clash with denols
SmorSSmor / help
3y ago
Is there a way to use tsserver instead of deno lsp in VSCode?
micuseymMmicuseym / help
2y ago
DenoLS interfering with TsServer in neovim
:D::D / help
2y ago