title: why the keyof word in TypeScript behaves different in 2 `type defination`s?
body: <p>why the <code>res1</code> can't know its type is <code>number</code> as the <code>res2</code> does?</p>
  
  <pre><code>interface P {
    name: string;
    age: number;
  }
  const people: P = {
    age: 30,
    name: 'Peter',
  };
  
  type T = keyof P
  type Fn1 = (p: P, t: T) =&gt; P[T]
  type Fn2 = &lt;P, T extends keyof P&gt;(p: P, t: T) =&gt; P[T]
  
  const fn1: Fn1 = (p, t) =&gt; {
    return p[t]
  }
  const fn2: Fn2 = (p, t) =&gt; {
    return p[t]
  }
  
  const res1 = fn1(people, 'age');
  const res2 = fn2(people, 'age');
  </code></pre>