Sunday, January 29, 2017

Getting Started with TypeScript using Visual Studio Code

Getting Started with TypeScript using Visual Studio Code





1.install Typescript using NPM

npm install -g TypeScript


2. create file  tsconfig.json

{
 "compilerOptions":
{
 "target": "es5",
 "module": "commonjs",
 "sourceMap": true
 }
}


3. create tasks.json with Ctrl+Shift+P and type Configure Task Runner

{
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "tsc",
"isShellCommand": true,
"args": ["-p", "."],
"showOutput": "silent",
"problemMatcher": "$tsc"
}


0 comments:

Post a Comment