visual-studio-codeintellisensejavascript-intellisense

VSCode doesn't suggest built-in modules in TS files


When I start typing in my new Node project, for instance, "fs" in a .js file, I get the "fs" modules as a suggestion:

enter image description here

But when I try to type it in a .ts file, I get nothing:

enter image description here

Is there a way to get the suggestion also when I type a .ts file?

thanks!

I have tried to:


Solution

  • I found a solution:

    Just install the @types/node package using npm or yarn to your project:

    yarn add --dev @types/node