How to get intellisense for express.js in vscode How to get intellisense for express.js in vscode express express

How to get intellisense for express.js in vscode


VS Code editor supports code auto completion for many of the programming languages like Javascript, TypeScript, JSON, HTML, CSS, Less, and Sass. Where as for other programming languages you may need to go and install the plugins.

To get auto completion type a key word and hit Ctrl+space to get the code auto completion suggestions as shown below.

enter image description here

But if you are still not getting then you need to go back and check your settings. Go to File->Preferences->Settings this opens up the window where you can change some of your preferences

enter image description here

and in this section go to Text Editor and Suggestions and check what are your settings for quick suggestions like if it is enabled or not and what is the delay set for the suggestions to appear you can make changes in it and check if it is working or not. Hope this would be helpful.


A lot of delay in my answer, but here it goes:

You're using a .js file, so types doesn't exist on it. When you install the @types/something dependency via npm, this allows you using types, but only in Typescript.


import this code:

/** @type {import("express").RequestHandler} */