Tuesday, November 5, 2013

Visual Studio 2013: Search for TypeScript Typings

One of the nice features that TypeScript offers is the support for declaration files. With these declaration files you get better Intellisense and error detection for many popular JavaScript libraries. On GitHub you can find a long list of libraries that have a declaration file available.

To simplify finding these definition files for a specific JavaScript library, the TypeScript team added a nice feature to the Visual Studio IDE: “Search for TypeScript Typings…”.

image

By right clicking on any JavaScript file inside your project and choosing this option, it will start a search on NuGet for TypeScript-related packages matching the name of the JavaScript file. If you install a typing package, it will automatically be referenced by all of the TypeScript files in your project. You no longer need to explicitly add reference tags in your TypeScript code to each of the declaration files.

image

1 comment:

Shruti Ramalingam said...
This comment has been removed by a blog administrator.