title: Default value for default generic
body: <p>Consider a generic class:</p>
  
  <pre><code>abstract class Base&lt;T={}&gt; {
      public getSmth(): T {
          ...
      }
  }
  </code></pre>
  
  <p>I want <code>getSmth</code> method to return <code>{}</code> if <code>T={}</code> and be abstract (require to be overriden in derived classes) for all other <code>T</code>. Cow can I do that?</p>
  
  <p>I've tried following <a href="https://www.typescriptlang.org/play/#src=abstract%20class%20Base%3CT%3D%7B%7D%3E%20%7B%0D%0A%20%20%20%20public%20getSmth()%3A%20T%20%7B%0D%0A%20%20%20%20%20%20%20%20return%20%7B%7D%20as%20T%3B%0D%0A%20%20%20%20%7D%0D%0A%7D%0D%0A%0D%0Aclass%20A%20extends%20Base%3C%7B%7D%3E%20%7B%0D%0A%20%20%20%20%2F%2F%20No%20need%20to%20override%20%60getSmth%60%0D%0A%7D%0D%0A%0D%0Aclass%20B%20extends%20Base%3C%7B%20x%3A%20number%20%7D%3E%20%7B%0D%0A%20%20%20%20public%20getSmth()%20%7B%20%2F%2F%20Need%20to%20override%20as%20generic%20differes%0D%0A%20%20%20%20%20%20%20%20return%20%7Bx%3A%208%7D%3B%0D%0A%20%20%20%20%7D%0D%0A%7D%0D%0A%0D%0Aclass%20C%20extends%20Base%3C%7B%20x%3A%20number%20%7D%3E%20%7B%0D%0A%20%20%20%20%2F%2F%20No%20override%20for%20a%20generic%20parameter%20should%20be%20a%20error!%0D%0A%7D" rel="nofollow noreferrer">code</a>, but the problem is that there's no error for class <code>C</code>:</p>
  
  <pre><code>abstract class Base&lt;T={}&gt; {
      public getSmth(): T {
          return {} as T;
      }
  }
  
  class A extends Base&lt;{}&gt; {
      // No need to override `getSmth`
  }
  
  class B extends Base&lt;{ x: number }&gt; {
      public getSmth() { // Need to override as generic differes
          return {x: 8};
      }
  }
  
  class C extends Base&lt;{ x: number }&gt; {
      // No override for a generic parameter should be a error!
  }
  </code></pre>