【问题标题】:Build:Generic type 'Promise<T, R>' requires 2 type argument(s)Build:Generic type 'Promise<T, R>' 需要 2 个类型参数
【发布时间】:2017-06-02 10:43:20
【问题描述】:

在 Visual Studio 上运行我的项目时出现此错误。很烦人。我什至无法编译

【问题讨论】:

  • 我猜你在某个地方试图创建一个只有一个类型参数的Promise&lt;T&gt;,但由于你没有发布任何代码,所以无法判断。

标签: visual-studio typescript compiler-errors promise


【解决方案1】:

这看起来像是 NS 模块中的 Promise 定义和 ES6 类型之间的冲突。 正如在回答类似问题 here 中提到的,尝试构建 tns-core-modules.es6.d.ts 而不是通常的 tns-core-modules.d.ts

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-01-09
    • 2017-02-08
    • 2018-11-13
    • 1970-01-01
    • 2017-12-05
    • 2018-10-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多