The problem I'm experiencing
I installed Bun in WSL and connected to it via VS Code, but when I tried to use Bun.serve
in my code, VS Code shows an error saying Cannot find name 'Bun'
. I know this is because VS Code doesn't know that I'm using Bun, but I don't know how I can make VS Code recognize Bun.
What I tried
I tried installing the official Bun VS Code extension, but the error persisted. I also searched on Google but I didn't find anything.
What I was expecting
The error should stop showing and ideally VS Code should provide autocompletion for the Bun
singleton.
have you try this one:
On TS you need to install bun-types as devDependency.
Command:
tsconfig.json file:
Follow this doc: https://bun.sh/docs/runtime/typescript