title: typescript generics assign empty object
body: <p>this is what I want to achieve:</p>
  
  <pre><code>interface IFoo { ... }
  function extendWithFoo&lt;T extends {}&gt;(x: T = {}): T &amp; IFoo {
   ...
  }
  </code></pre>
  
  <p>I'm getting error TS2322: Type '{}' is not assignable to type 'T'.</p>
  
  <p>Is there a way to do this?</p>