Visual Studio Code
is powerful IDE that Microsoft released at Build 2015. There have been several questions regarding how to setup TypeScript with Visual Studio Code on OSX. I decided that I’d stop for a second and make a quick post showing you exactly how to do it.
Install TypeScript first
From your terminal, enter the following :
npm install -g typescript
You should see the following in your terminal window after running the command :
$ npm install -g typescript
/usr/local/bin/tsc -> /usr/local/lib/node_modules/typescript/bin/tsc
/usr/local/bin/tsserver -> /usr/local/lib/node_modules/typescript/bin/tsserver
Notice that it installed typescript 1.5.0-beta. This is required for Visual Studio Code.
Back to Visual Studio Code
Create a New Project and create a new file called tsconfig.json.
Note: By default the target is ES3. I changed mine to ES5, which Visual Studio Code supports, but it also supports ES6 (experimental).
Build the Project
If you press CMD-Shift-B, then it will ask you to configure the Task Runner. You will now have a file called tasks.json. Make sure it looks like the following:
// The command is tsc.
// Show the output window only if unrecognized errors occur.
// Under windows use tsc.exe. This ensures we don't...(Read whole news on source site)