McLovin
McLovin•2mo ago

Deno TS configuration

Good day. I am new to Deno and trying to get type checking working correctly in my TypeScript project. It seems that my autocomplete is able to infer the correct types but Deno is not highlighting errors like assigning variables with the incorrect types (username should also be type string not string | undefined) although it does pick up unused variables. To me it seems as if strict mode may not be enabled even though I have it specified in my deno.json. Using PhpStorm with Deno LSP and lsp config attached. Thank you for the help 🙂
No description
No description
No description
No description
2 Replies
DimmieMan
DimmieMan•2mo ago
You can remove the entirety of those compiler options. In deno.json add a new import record for the alias.
"imports": {
"@/": "src/"
}
"imports": {
"@/": "src/"
}
Ohh it's jetbrains The Deno plugin is in disrepair, it's an official Jetbrains one, not the Deno team. I'd recommend doing typescript work in VSCode, Zed, or any other editor that just run the deno language server. I say this as a Jetbrains subscriber for 7-8 years now. This isn't Deno specific either, I find node based TS work in Webstorm to be excruciating since 2024.x.
McLovin
McLovinOP•2mo ago
Ah I didnt notice the deno plugin had so many issues, just checked the reviews now seems like a lot of people have issues. thanks for the assitance

Did you find this page helpful?