【问题标题】:How do I remove typescript definition?如何删除打字稿定义?
【发布时间】:2016-04-27 14:08:52
【问题描述】:

我发现一些定义对我来说是必要的。我试图删除,但找不到指定命令。不像npm它有uninstall命令可以直接卸载它们,所以我只是从tsd.json中删除它们而不输入uninstall命令。

【问题讨论】:

    标签: typescript tsd


    【解决方案1】:

    运行tsd reinstall --clean 将消除在tsd.json 中找不到的定义。

    请注意,tsd 已弃用。考虑使用 typings 作为您的定义包管理器。

    以下是使用typings

    卸载定义包的方法
    typings uninstall <name> [--save|--save-dev|--save-peer] [--ambient]
    Options:
      [--save|-S]       Remove from "dependencies"
      [--save-dev|-D]   Remove from "devDependencies"
      [--save-peer|-P]  Remove from "peerDependencies"
      [--ambient|-A]    Remove from the ambient version of dependencies
        [-SA]           Remove from "ambientDependencies"
        [-DA]           Remove from "ambientDevDependencies"
    Aliases: r, rm, remove, un
    

    【讨论】:

      猜你喜欢
      • 2020-06-08
      • 2022-01-28
      • 2018-06-05
      • 2013-04-18
      • 2018-08-24
      • 1970-01-01
      • 2019-04-18
      • 2023-02-02
      • 2016-08-13
      相关资源
      最近更新 更多