- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.1k
Closed
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug
Description
TypeScript Version: 2.0.3
Code
let map = new Map<string, string>();
map.set('hello', 'world');
for (let key of map.keys()) {
    console.log(key);
}Expected behavior:
It should not throw.
Actual behavior:
It throws error TS2495: Type 'IterableIterator<string>' is not an array type or a string type.
tsconfig.json:
{
  "compilerOptions": {
    "experimentalDecorators": true,
    "lib": [
      "dom",
      "es7",
      "scripthost"
    ],
    "moduleResolution": "node",
    "noImplicitAny": false,
    "preserveConstEnums": true,
    "pretty": true,
    "removeComments": false,
    "sourceMap": true,
    "target": "ES5"
  }
}cc: @Mischi
robianmcd, kolosovsky and MichealXie
Metadata
Metadata
Assignees
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug