Get typescript definition files via bower?

余生长醉 提交于 2019-12-03 10:53:45

It is possible with bower.

First install bower by using npm:

npm install -g bower

Then install DefinitelyTyped by using bower:

bower install DefinitelyTyped

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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!