简体   繁体   中英

Typescript compiler failing with strange error

I'm getting the following error:

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

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

I also have a declaration file global.d.ts:

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

Some googling indicates that declaration files might cause issues.

Error TS1005: '=' expected

The error is two fold.

Personal opinion

Please use TypeScript nightlies otherwise it will always be an uphill / confusing battle. 🌹

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM