Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get typescript definition files via bower?

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?

like image 793
kOssi Avatar asked Feb 19 '15 09:02

kOssi


2 Answers

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

like image 91
Martin Avatar answered Nov 12 '22 10:11

Martin


It is possible with bower.

First install bower by using npm:

npm install -g bower

Then install DefinitelyTyped by using bower:

bower install DefinitelyTyped
like image 26
Roel van Lisdonk Avatar answered Nov 12 '22 10:11

Roel van Lisdonk