Error TS2304: Cannot find name 'Iterable'

Hello,

I want to use Three.js with TypeScript. I studied how to make workflow with Gult, Browserify, and uglify here: https://www.typescriptlang.org/docs/handbook/gulp.html

I installed TypeScript 2.3.2.

I receive this message after gulp command:

TypeScript error: node_modules/@types/three/three-core.d.ts(767,24): Error TS2304: Cannot find name ‘Iterable’.

Solution. Add “lib”: [ “es2015”, “dom” ] in tsconfig.json

{
  "files": [
    "src/Game.ts"
  ],
  "compilerOptions": {
    "noImplicitAny": true,
    "target": "es5",
    "lib": [ "es2015", "dom" ]
  }
}
2 Likes

thank you so much…it works fine for me…!

1 Like