Visual Studio Code, Microsoft's lightweight, cross-platform code editor, supports TypeScript development out of the box. By default, it uses the latest stable TypeScript release to compile .ts files. Since VS Code is highly configurable, you can easily switch to a different version of the TypeScript compiler, including the nightly build. Here is how:
Install TypeScript: npm install typescript@next
Open the File / Preferences / User Settings menu (or create the file .vscode\settings.json)
Set the typescript.tsdk setting to point to the local package:
JSON
{
"typescript.tsdk": "node_modules/typescript/lib/"
}
Add the compilation task (CTRL+B)
JSON
{
"version": "0.1.0",
"command": "tsc",
"isShellCommand": true,
"args": ["-w", "-p", "."],
"showOutput": "silent",
"isWatching": true,
"problemMatcher": "$tsc-watch"
}
Do you have a question or a suggestion about this post? Contact me!