Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I use tsd or typings?

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!

like image 529
uksz Avatar asked Mar 31 '16 07:03

uksz


1 Answers

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.

like image 177
Blake Mumford Avatar answered Oct 10 '22 20:10

Blake Mumford