title: What are the types of keys and values of a string enum?
body: <p>Say, I have a enum like this:</p>
  <pre><code>export enum Lang {
    eng = '',
    rus = '',
    jap = '',
    chi = '',
  }
  </code></pre>
  <p>I have a function that accepts a key of that enum and returns its value:</p>
  <pre><code>function langToFlag(key) {
    return Lang[key];
  }
  </code></pre>
  <p><strong>Question</strong>: How do I type the argument and the return value of this function?</p>
  <p>I expected something like:</p>
  <pre><code>function LangToFlag(key: keyof Lang): valueof Lang {
  </code></pre>
  <p>...but <code>keyof</code> includes all internal <code>Object</code> properties and <code>valueof</code> does not exist.</p>