Closed
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