我试图在Visual Studio 2015 RC中的ASP.NET v5 web项目中从DefinitelyTyped安装TypeScript定义文件? NuGet软件包似乎不再工作,TSD在一段时间内还没有更新,在VS中使用它时,我还没有看到很多很好的文档.
@H_502_2@VS 2015 RC还有什么方法?
解决方法
TSD是
deprecated.一般偏好的选择是
Typings.
@H_502_2@来自文档:
@H_502_2@# Install Typings CLI utility.
npm install typings –global @H_502_2@# Search for definitions.
typings search tape @H_502_2@# Find an available definition (by name).
typings search –name react @H_502_2@# If you use the package as a module:
# Install non-ambient typings (default from “npm” registry,configurable throughdefaultSource
in.typingsrc
)
typings install debug –save @H_502_2@# 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 @H_502_2@# Install typings from particular registry
typings install env~atom –global –save
typings install npm~bluebird –save @H_502_2@# Usetypings/index.d.ts
(intsconfig.json
or as a///
reference).
cat typings/index.d.ts