加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

如何在ASP.NET 5中添加一个TypeScript绝对类型的定义?

发布时间:2020-12-15 20:15:20 所属栏目:asp.Net 来源:网络整理
导读:我试图在Visual Studio 2015 RC中的ASP.NET v5 web项目中从DefinitelyTyped安装TypeScript定义文件? NuGet软件包似乎不再工作,TSD在一段时间内还没有更新,在VS中使用它时,我还没有看到很多很好的文档. VS 2015 RC还有什么方法? 解决方法 TSD是 deprecated.
我试图在Visual Studio 2015 RC中的ASP.NET v5 web项目中从DefinitelyTyped安装TypeScript定义文件? NuGet软件包似乎不再工作,TSD在一段时间内还没有更新,在VS中使用它时,我还没有看到很多很好的文档.

VS 2015 RC还有什么方法?

解决方法

TSD是 deprecated.一般偏好的选择是 Typings.

来自文档:

# 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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读