【问题标题】:How to add @types dependences in DefinitelyTyped packages?如何在DefiniteTyped 包中添加@types 依赖项?
【发布时间】:2018-02-23 09:19:28
【问题描述】:

DefinitelyTyped 中的包应该依赖于@types/webvr-api。 但是,DefinitelyTyped 中没有 package.json。 这是链接:https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/playcanvas

如何为我的包裹添加@types/webvr-api

【问题讨论】:

    标签: typescript definitelytyped


    【解决方案1】:

    您可以使用/// <reference types="..." />directiveyou can find plenty examples with this searchlike this one in riotjs-render.d.ts

    /// <reference types="jquery" />
    

    【讨论】:

    • 我需要把jquery.d.ts放在文件夹里吗?
    • 我不这么认为,但是任何使用你的类型的人都必须安装 jquery 类型,所以将它们作为开发依赖添加到你的主包中可能是有意义的
    猜你喜欢
    • 1970-01-01
    • 2021-03-11
    • 2019-11-19
    • 2021-10-15
    • 2012-08-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-17
    相关资源
    最近更新 更多