title: Typescript keyof array includes prototype methods
body: <p>I have the following code:</p>
  <pre><code>const arr = [1, 2, 3] as const;
  
  type Keys = keyof typeof arr;
  
  type T = {
    [K in Keys]: K extends 1 ? 2 : 3 // dummy
  }
  </code></pre>
  <p>Why does the <code>T</code> type contain the <code>prototype keys</code>:</p>
  <p><a href="https://i.stack.imgur.com/EZM4s.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EZM4s.png" alt="enter image description here" /></a></p>
  <p>I'm expecting the keys to be only <code>0</code>, <code>1</code>, <code>2</code> in this case. How can I get only the array keys?</p>
  <p>How can we create a new type from an array by looping over its keys?</p>