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.
an old version of the definition file eg this verion has readonly
https://github.com/ivogabe/gulp-typescript/blob/3645edb57278a22e08e6ae9780dc09b8ae68003e/release/compiler.d.ts#L32
an old version of the compiler that doesn't support new keywords (like readonly
).
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.