TypeScript and Iterator: Type 'IterableIterator<T>' is not an array type

Solution 1:

If possible update target to es2015 (or above) in the tsconfig to resolve the error without enabling down level iteration`:

{
  "compilerOptions": {
    "target": "es2015"
  }
}

If you target es5, enable downLevelIteration explicitly in the tsconfig:

{
  "compilerOptions": {
    "target": "es5",
    "downlevelIteration": true
  }
}