How do I add a TypeScript definitely typed definition in ASP.NET 5?

只谈情不闲聊 提交于 2019-12-05 00:52:24

TSD is deprecated. The generally preferred alternative is Typings.

From docs:

# Install Typings CLI utility.
npm install typings --global

# Search for definitions.
typings search tape

# Find an available definition (by name).
typings search --name react

# If you use the package as a module:
# Install non-ambient typings (default from "npm" registry, configurable through defaultSource in .typingsrc)
typings install debug --save

# If you use the package through script tag, or
# it is part of the environment, or
# the non-ambient typings is not yet available:
typings install dt~mocha --global --save

# Install typings from particular registry
typings install env~atom --global --save
typings install npm~bluebird --save

# Use typings/index.d.ts (in tsconfig.json or as a /// reference).
cat typings/index.d.ts

I have been using TSD from NPM. It is working fine with my MVC 6 project and should definitely be the most up to date source of definitions.

This should be all you need to get going:

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