How does one add a typing to typings.json for Typescript in Visual Studio 2015? How does one add a typing to typings.json for Typescript in Visual Studio 2015? typescript typescript

How does one add a typing to typings.json for Typescript in Visual Studio 2015?


  1. Make sure you have npm installed
  2. Open up your console of choice (e.g. command prompt or powershell)
  3. Navigate to your project folder

Using only npm (TypeScript 2 and later):

  1. npm install --save @types/jquery

    Done: See this for more info.

Using typings (Typescript before v.2):

  1. Make sure you have typings installed, if not run npm install typings --global
  2. Write typings install dt~jquery --save --global

    This should update your typings.json file and download the definition files.

    In the above example for typings, 'dt~' means that it should look for jquery in the DefinitelyTyped repository, the default is 'npm'. The syntax has changed slightly from version 0.x to 1.0, the flag --global was previously --ambient.


I found that opening and resaving package.json once the typings.json file had been created triggered the typings to pull down. This is my current typings file:

{    "ambientDependencies": {        "es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#7de6c3dd94feaeb21f20054b9f30d5dabc5efabd",        "jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#7de6c3dd94feaeb21f20054b9f30d5dabc5efabd"  }}