This is the jsconfig.json file that I am using:
{ "compilerOptions": { "target": "ES6", "module": "commonjs", "files": [ "typings/node/node.d.ts" ] } }
The typings folder exists next to the jsconfig.json file in the root of the project.
If you select an unknown global object, such as __dirname in nodejs, press cmd + . ( ctrl + . on PC?), then select the Download typings that they will create for you.
source share