Gulp 通过打字添加的类型定义失败,而 VS2015 没有问题

Gulp fails on type definitions added via typings while VS2015 has no issue

我正在尝试使用 Ionic 2 开发应用程序,但我在使用 [=14 时遇到了一些问题=]gulp。你可以看看我的问题的详细版本here。我希望有人能帮助我,在此先感谢。

已解决

您可以在 Ionic 论坛 this answer 中查看以下解决方案的进一步说明。

选项 1

将index.d.ts添加到库src字段(不推荐)可以位于node_modules > ionic-gulp-browserify-typescript > index.js。例如:

src: ['./app/app.ts', './typings/main.d.ts', './typings/index.d.ts'],

选项 2

添加对 main.d.ts 的引用。例如:

/// <reference path="globals/amqplib/index.d.ts" />
/// <reference path="globals/node/index.d.ts" />
/// <reference path="globals/when/index.d.ts" />