Skip to content

Automatic Typings Acquisition

Matt Bierner edited this page Jun 9, 2016 · 21 revisions

Starting with NTVS 1.2 Alpha for Visual Studio 2015, NTVS will automatically attempt to download typings for common Node packages in order to improve Javascript IntelliSense. These typings show up in the typings directory and in the tsd.json. They will also be included in your Visual Studio projects.

Automatic Typings Acquisition status bar

Downloading typings automatically enables a much better Intellisense experience for Javascript projects.

When Are Typings Automatically Acquired?

Types are automatically downloaded if all of the following are true:

  • You are using the NTVS 1.2 Alpha+.
  • You are on VS 2015 (not VS "15").
  • You have a Javascript project (not Typescript).
  • Intellisense mode is "ECMAScript 6".

Typings are automatically downloaded for all existing Node.js packages, as well as any new packages that are installed.

How are Typings Acquired?

Typings are automatically acquired by NTVS whenever a new Node package is installed. The typings are downloaded using TSD and placed into a typings folder in each project, similar to the node_modules folder. Optionally a tsd.json file can also be created to track which typings that are currently installed.

Additionally, in VS 2015, the typings files have to be included the Visual Studio project in order for them to actually be picked up by our new Typescript based language service.

🎵Note: You can add the typings directory to your .gitignore to exclude it from source control, but this file must stay in the Visual Studio solution. This file is are only required by the NTVS tooling and will be recreated if it is missing.

Configuring Automatic Typings Acquisition