Should I use tsd or typings?
Asked Answered
C

3

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!

Coconut answered 31/3, 2016 at 7:43 Comment(0)
A
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

Adonic answered 31/3, 2016 at 7:51 Comment(2)
I noticed that too but still typings is not helping in install defintions for 3rd party tools like jquery! tsd was more helpful. what do you think?Medeah
No idea. I'm not using TS (except for Plunkers) myself - only Dart.Overcash
S
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.

Schizophyceous answered 28/8, 2016 at 4:31 Comment(1)
after tsd and typings, this is the way to go finally!Maundy
A
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

Adonic answered 31/3, 2016 at 7:51 Comment(2)
I noticed that too but still typings is not helping in install defintions for 3rd party tools like jquery! tsd was more helpful. what do you think?Medeah
No idea. I'm not using TS (except for Plunkers) myself - only Dart.Overcash
K
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
Kendrick answered 31/3, 2016 at 7:58 Comment(1)
The quote from the source is actually, "Transitive typings are no longer included in the distribution."Sarthe

© 2022 - 2024 — McMap. All rights reserved.