title: Object key based on array values
body: <p>I have array: <code>const arr = ['foo', 'bar', 'bax'];</code></p>
  <p>I want to create an object based on array entries:</p>
  <pre><code>const obj = {
    foo: true,
    bar: true,
    bax: false,
    fax: true, // typescript should show error here because &quot;fax&quot; is not in &quot;arr&quot;
  };
  </code></pre>
  <p>How to tell typescript that all keys of <code>obj</code> must be inside <code>arr</code>?</p>