title: How would I implement this type in Typescript (from Flow?)
body: <p>I'd like to implement an equivalent in Typescript</p>
  
  <p><code>export type ObjMap&lt;T&gt; = { [key: string]: T, __proto__: null, ... }</code></p>
  
  <p><strong>Update</strong></p>
  
  <p>To further clarify what this does, for an array of objects, it returns an array with a key added for each object in the source array. So:</p>
  
  <pre><code>const people = [
    { name: 'Bill', id: '1234' },
    { name: 'Sophie', id: '5309' }
  ]
  </code></pre>
  
  <p>would become</p>
  
  <pre><code>[
    { Bill: { name: 'Bill', id: '1234' },
    { Sophie: { name: 'Sophie', id: '5309' }
  ]
  </code></pre>
  
  <p>The <code>__proto__</code> is a way to ensure that the returned objects have no protoypes.</p>