- You need to have
jsconfig.json
in your project root directory
{
"compilerOptions": {
"target": "es2015",
"module": "commonjs",
"allowSyntheticDefaultImports": true
},
"exclude": [
"node_modules"
]
}
- Install
typings
as global npm module
npm install -g typings
- Install
Typing installer
VSCode extension. - Install typings for libraries you use -
node
,jQuery
,vue
, ...
- To be able to navigate (cmd + click) ES6 style modules you need to specify it as
target
ofcompilerOptions
insidejsconfig.json
file. - use
allowSyntheticDefaultImports: true
when you use ES6 modules in your JS and you want to have TypeScript typings