How do you iterate over a set in TypeScript? for..of does not work:
\'Set\' is not an array type or a string type
.for
@SnareChops was mostly correct:
mySet.forEach(function(item){
// do something with "this"
}, **this**);
This works.
I'm guessing:
for(item of mySet.values()){
}
Would work if I weren't working with es-shim stuff which is messing everything up for me. But the shim stuff is prescribed by the Angular 2 crew so ¯_(ツ)_/¯
The only other thing that worked was:
for (var item of Array.from(set.values())) {
}
or something like that, which is just terrible.