title: Type '{ .... }' is not assignable to type 'T'
body: <p>I have created this type that based on my interfaces:</p>
  <pre><code>interface Base {
    prop1: any;
  }
  
  interface A extends Base {
    propA: string;
  }
  
  interface B extends Base {
    propB: string;
  }
  </code></pre>
  <p>And a function that suppose to return any of my interface types</p>
  <pre><code>  public getObject&lt;T extends Base&gt;(id): T {
      return {
        prop1: id, //prop on Base type
        propA: '2'//prop on type A
      }
    }
  </code></pre>
  <p>My <code>getObject</code> throws an error <code>Type '{ prop1: any; propA: string; }' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to '{ prop1: any; propA: string; }'.</code></p>
  <p>How to fix that?</p>
  <p>UPDATE:</p>
  <p>If I change my function to that it kinda works</p>
  <pre><code>  public getObject(id): A | B {
      return {
        prop1: id, //prop on Base type
        propA: '2'//prop on type A
      }
    }
  </code></pre>
  <p>But that means if I add more interfaces that extends <code>Base</code> I had to add each new interface type to the  <code>getObject(id): A | B | ....</code> return which is weird</p>