title: TypeScript: Object.keys return string[]
body: <p>When using <code>Object.keys(obj)</code>, the return value is a <code>string[]</code>, whereas I want a <code>(keyof obj)[]</code>.</p>
  
  <pre><code>const v = {
      a: 1,
      b: 2
  }
  
  Object.keys(v).reduce((accumulator, current) =&gt; {
      accumulator.push(v[current]);
      return accumulator;
  }, []);
  </code></pre>
  
  <p>I have the error:</p>
  
  <blockquote>
    <p>Element implicitly has an 'any' type because type '{ a: number; b: number; }' has no index signature.</p>
  </blockquote>
  
  <p>TypeScript 3.1 with <code>strict: true</code>. Playground: <a href="http://www.typescriptlang.org/play/#src=const%20v%20%3D%20%7B%0D%0A%20%20%20%20a%3A%201%2C%0D%0A%20%20%20%20b%3A%202%0D%0A%7D%0D%0A%0D%0AObject.keys(v).reduce((accumulator%2C%20current)%20%3D%3E%20%7B%0D%0A%20%20%20%20accumulator.push(v%5Bcurrent%5D)%3B%0D%0A%20%20%20%20return%20accumulator%3B%0D%0A%7D%2C%20%5B%5D)%3B%0D%0A" rel="noreferrer">here</a>, please check all checkboxes in <code>Options</code> to activate <code>strict: true</code>.</p>