title: Get exact return type from T[keyof T]
body: <p>What I have:</p>
  <pre><code>class App&lt;T&gt; {
      config: T // T is supposed to be Record&lt;string, _different types_&gt;
  }
  
  config = // T example
  {
      'part1': Type1,
      'part2': Type2,
      'part3': Type3
  }
  </code></pre>
  <p>What I want to achive:</p>
  <pre><code>class App&lt;T&gt; {
      config: T,
      getPart(key) // get part of T with exact type, key is the key of T
  }
  
  const data = app.getPart('part2') // returns Type2
  </code></pre>
  <p>What I tried:</p>
  <pre><code>getPart(key: keyof T): T[keyof T] { // return type becomes T1 | T2 | T3
      return this.config[key];
  }
  </code></pre>
  <p>Problem: Is it possible to get the exact return type based?</p>
  <p>Thanks.</p>