Using the dev version of TypeScript with Visual Studio Code
Visual Studio Code, Microsoft's lightweight and multi-platform code editor, allows you to create projects using TypeScript. By default, the last stable version of TypeScript is used to compile the ts
files. Since Visual Studio Code is very configurable, it is easy to use another version of the TypeScript compiler, including the dev version (nightly build). Here is the procedure:
Install
TypeScript
:npm install typescript@next
Open the File / Preferences / User Settings menu (or create the file
.vscode\settings.json
)Change the variable
typescript.tsdk
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" }
Voilà
Do you have a question or a suggestion about this post? Contact me!
Enjoy this blog?💖 Sponsor on GitHub