TypeScript support
Starting with DevBuild “Feb 10, 2014”, NTVS includes preliminary support for TypeScript. The build is available at https://nodejstools.codeplex.com/releases/view/116275.
Installation
To enable TS support, first install the TS package:
1. Go to http://www.typescriptlang.org/#Download
2. Click on “Download the plugin”. Once you run the installer, you’ll enable TS for both VS2012 and VS2013.
3. Install the latest DevBuild from the NTVS Download page: https://nodejstools.codeplex.com/releases/view/116275
4. Restart VS
Once both are installed, try File/New/Project and you should see TypeScript/Node.js :
You should Node.js under the TypeScript node.
Now hit F5 and you’ll see that the TS compiler has been kicked off:
This will result in corresponding JS files being generated (which should not be generally edited or used for debugging). The .Net warning can be ignored or fixed by manually adding “ToolsVersion=4.0” into your njsproj xml root element.
Debugging
NTVS understands TS’s source maps (*.js.map) and provides the usual break, step in, out, conditional bkpoint, etc. support:
Intellisense
TS uses .d.ts files to provide intellisense support which can be used in NTVS full more accurate completions:
NOTE: This preliminary build ships with basic .d.ts files which only reflect a small portion of the available Node.js API. We suggest that you grab the latest .d.ts files from DefinitelyTyped at:https://github.com/borisyankov/DefinitelyTyped. You can drop these files into your project and get better intellisense.
Profiling
There is currently no Profiler support for NTVS+TS. We’ll add it in an upcoming build.