title: Is it possible in Typescript to iterate over a const enum?
body: <p>Similar to this <a href="https://stackoverflow.com/questions/39372804/typescript-how-to-loop-through-enum-values-for-display-in-radio-buttons">question</a>, but with the enumeration marked as a constant:  How do you go about iterating or producing an array of from the const enum?</p>
  
  <p><strong>Example</strong></p>
  
  <pre><code>declare const enum FanSpeed {
      Off = 0,
      Low,
      Medium,
      High
  }
  </code></pre>
  
  <p><strong>Desireable Results</strong></p>
  
  <pre><code>type enumItem = {index: number, value: string};
  let result: Array&lt;enumItem&gt; = [
      {index: 0, value: "Off"}, 
      {index: 1, value: "Low"}, 
      {index: 2, value: "Medium"}, 
      {index: 3, value: "High"}
  ];
  </code></pre>