7

I am wondering what is the recommended practice by Angular Team? I couldn't find it anywhere in the docs, and I am wondering what are the differences between the two. Any insights are more than welcome!

uksz
  • 18,239
  • 30
  • 94
  • 161

3 Answers3

14

It seems like the situation is changing again. From what I understand, Typescript 2.0 will use npm (Node Package Manager) to manage Typescript declarations for existing Javascript libraries.

The example given is that you can do:

npm install --save @types/lodash

Which will then do two things:

  1. Grabs the declaration files for lodash and saves it to a directory named @types/lodash in our package's node_modules.
  2. Saves that as a dependency in our package.json

For more information, please refer to this announcement from Microsoft: The Future of Declaration Files

And also this Github issue: Improve Declaration File Acquisition.

Blake Mumford
  • 17,201
  • 12
  • 49
  • 67
9

tsd seems to be deprecated in favor of typings and Angular is moving to typings.

I have seen it mentioned several times that tsd is deprecated

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
3

yeah as stated in angular2's changelog from beta6 https://github.com/angular/angular/blob/master/CHANGELOG.md#200-beta6-2016-02-11

  • typings are no longer included in the distribution
Pardeep Jain
  • 84,110
  • 37
  • 165
  • 215
  • 4
    The quote from the source is actually, "**Transitive** typings are no longer included in the distribution." – rinogo May 05 '16 at 21:51