Evaldas_B
Evaldas_B•11mo ago

TypeScript(Deno) unable to find types

Imports in TypeScript(Deno) are causing errors:
// Cannot find module 'npm:windmill-client@1.415.1' or its corresponding type declarations.(2307)
import * as wmill from "npm:windmill-client@1.415.1"
// Cannot find module 'npm:windmill-client@1.415.1' or its corresponding type declarations.(2307)
import * as wmill from "npm:windmill-client@1.415.1"
This is the same snippet that is provided by default the only difference is that the import is uncommented. Import is cashed so that should not be an issue. Can confirm the same behavior on self-hosted and cloud. The dependencies are actually loaded in and the scripts are running fine. The problem seems to be with TypeScript language server
No description
10 Replies
rubenf
rubenf•11mo ago
it's just a monaco issue that it still has the normal ts resolver you should have autocompletion on wmill regardless you basically have 2 ts assistant, the normal one and the one provided by lsp the normal one has issue resolving the import but not the lsp one as highlighted by "Resolved Dependency" so you can ignore the error /linear make deno web editor not show squiggly lines on resolved npm imports
Evaldas_B
Evaldas_BOP•11mo ago
Oh, makes sense. Am I assuming correctly that this would not be an issue VsCode if I were to spin it up locally?
rubenf
rubenf•11mo ago
correct
Evaldas_B
Evaldas_BOP•11mo ago
Ok, thanks 🙂
Lüku
Lüku•2w ago
you should have autocompletion on wmill regardless
@rubenf Does this mean that we should get autocompletion with the context of the type of wmill? Currently I am only getting string suggestions. Thanks for the help!
No description
rubenf
rubenf•2w ago
You have to hover the import and pull the dependency in frontend by clicking on the light
Lüku
Lüku•2w ago
oh, thanks for the help!
Lüku
Lüku•2w ago
@rubenf and how about relative imports like import {IDAJob} from './create_job.ts' PS: Is there documentation? I haven't found any and would have expected it here: https://www.windmill.dev/docs/code_editor/assistants
Code assistants | Windmill
Windmill integrates code assistants into its code editor to provide language-specific suggestions, linting, formatting, and more.
Lüku
Lüku•5d ago
@rubenf any info on the local imports? Thanks!

Did you find this page helpful?