【问题标题】:Typescript compiler failing with strange error打字稿编译器失败并出现奇怪的错误
【发布时间】:2016-06-07 12:51:20
【问题描述】:

我收到以下错误:

events.js:141
      throw er; // Unhandled 'error' event
      ^
TypeScript error: node_modules/gulp-typescript/release/compiler.d.ts(32,22): Error TS1005: '=' expected.

我的 gulpfile https://github.com/rtaycher/2048-Clone/blob/master/gulpfile.js

我还有一个声明文件 global.d.ts:

interface Array<T> {
    includes(searchElement: T) : boolean;
}

一些谷歌搜索表明声明文件可能会导致问题。

【问题讨论】:

  • 你用的是什么版本的打字稿?
  • tsc 版本 1.8.10

标签: javascript typescript compiler-errors gulp browserify


【解决方案1】:

错误 TS1005:预期为“=”

错误是两倍。

个人意见

请使用 TypeScript nightlies,否则这将永远是一场艰难/混乱的战斗。 ?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-03-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-25
    • 1970-01-01
    相关资源
    最近更新 更多