Closed
Description
TypeScript Version: 2.1.6
Code
let entries: Map<string, string[]> = new Map<string, string[]>();
entries.set('a', ['foo'])
for (let entry of entries.values()) {
// do something with the entry
}
Expected behavior:
Since Typescript is advertised as a superset of ES6 than expected is that it should support es6 features. Therefor for ... of
should work properly with IterableIterator
as described here : https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map
Actual behavior:
Compilation fails
TS2495: Type 'IterableIterator<string[]>' is not an array type or a string type.