13

Are there any other possibilities to get TypeScript type definitions then copy from the useful DefinitelyTyped Repo or using NuGet? Maybe bower or something like that?

Reporter
  • 3,897
  • 5
  • 33
  • 47
kOssi
  • 745
  • 2
  • 10
  • 19

3 Answers3

22

The best option is to use tsd. It is like npm or bower, but for typescript definitions

 npm install tsd@next -g

 cd path/to/your/project
 tsd init

Then

 tsd install jQuery --save

That's it.

EDIT

There is a new TypeScript definition manager, typings, with the goal of non-ambient type definitions used by external modules.

EDIT

With the future TypeScript 2, you will be able to install type definitions with npm install @types/jQuery

Martin
  • 15,820
  • 4
  • 47
  • 56
1

It is possible with bower.

First install bower by using npm:

npm install -g bower

Then install DefinitelyTyped by using bower:

bower install DefinitelyTyped
  • 6
    I would not reccommend this option. DefinitelyTyped in VS brings the IDE to a screaming flaming halt. Pegs my CPU near 100% even when doing nothing, with all editor windows closed for several minutes. – Sean Hederman Jan 08 '16 at 08:50
  • Note that this will get *all* TypeScript definitions available from DefinitelyTyped. – Chris Halcrow Dec 18 '17 at 05:38
-1

They can be installed via nuget e.g. https://www.nuget.org/packages/jquery.TypeScript.DefinitelyTyped/

This also may be of use:

https://github.com/DefinitelyTyped/tsd

mbx-mbx
  • 1,765
  • 11
  • 23
  • As my question explains I know there is the possibility to get definitions via NuGet. I am developing on Ubuntu/Mac OS where NuGet is not the best solution. – kOssi Feb 19 '15 at 09:44
  • Your question is not clear enough, it sounds like you are asking if you can install them via nuget. – mbx-mbx Feb 19 '15 at 09:44
  • Ok, a common task to get libraries and other dependencies for frontend developing is to use [bower](http://bower.io/). It would be nice to get TypeScript type definitions also via bower. – kOssi Feb 19 '15 at 09:48