W
Windmill8mo ago
Rei

Bun - not working typescript intellisense on imported npm modules

Hi, when I'm using Bun as a runtime I don't get any typescript info when I'm importing non-standard npm modules, like here:
import { thingThatDoesntExist } from "zod";


export async function main(

) {
thingThatDoesntExist("mario");
}
import { thingThatDoesntExist } from "zod";


export async function main(

) {
thingThatDoesntExist("mario");
}
This example doesn't error in editor on app.windmill.dev when using Bun, but it shows an error when using Deno. Is it a bug or just Bun limitation?
No description
7 Replies
rubenf
rubenf8mo ago
We use typescript lsp that does some autodiscovery of types but possibly zod require a separate type packages that lsp doesn't autodiscover ?
Rei
Rei8mo ago
zod has built-in typescript declarations
Rei
Rei8mo ago
No description
rubenf
rubenf8mo ago
I'm not sure why typescript lsp doesn't pick them up at the moment
Rei
Rei8mo ago
it works with common packages like express, but If I try to import something different like aws-sdk it doesn't work
rubenf
rubenf8mo ago
unfortunately the typescript lsp we use for bun is not as good as the one for deno we could improve it by doing more efforts in that direction
Rei
Rei8mo ago
it is not that important, I can always edit scripts in my local vscode and it works fine there, but I would be grateful! thanks for help