How to iterate over a Set in TypeScript?
<p>How do you iterate over a set in TypeScript?  for..of does not work:</p>

<pre><code>'Set&lt;string&gt;' is not an array type or a string type
</code></pre>

<p><code>.forEach</code> is not acceptable, because it hides <code>this</code>. I'd prefer not to do a while loop in a try catch block. What am I missing? It can't it possibly so clumsy as to require try {while} catch {}.</p>