title: How do I access Typescript Enum by ordinal
body: <p>I have the following...</p>
  
  <pre><code>enum NubDirection {
    OUTWARD,
    INWARD
  }
  ...
  direction : NubDirection;
  ...
  let index = Math.floor(Math.random() * 2) + 1;
  nub.direction = NubDirection[index];
  </code></pre>
  
  <p>But this throws</p>
  
  <blockquote>
    <p>error TS2322: Type 'string' is not assignable to type 'NubDirection'.</p>
  </blockquote>