title: Trying to override and extend method signature in child class in Typescript
body: <p>I have a base class that I am trying to extend:</p>
  
  <pre><code>export class BaseClass&lt;T extends SomeOtherClass&gt; {
    constructor(param: ParamType) {
    }
  
    doSomething(param1: Param1Type): BaseClass&lt;T&gt; {
      // do something with param1;
      return this;
    } 
  }
  </code></pre>
  
  <p>My class:</p>
  
  <pre><code>export class MyClass&lt;T extends SomeOtherClass&gt; extends BaseClass&lt;T&gt; {
  
    constructor(param: ParamType) {
      super(param);
    }
  
    doSomething(param1: Param1Type, param2: Param2Type): MyClass&lt;T&gt; {
      // super.doSomething(param1);
      // do something with param2;
      return this;
    }
  }
  </code></pre>
  
  <p>but I'm getting a warning: </p>
  
  <pre><code>Property 'doSomething' in type 'MyClass&lt;T&gt;' is not assignable to the same property in base type 'BaseClass&lt;T&gt;'.
    Type '(param1: Param1Type, param2: Param2Type) =&gt; MyClass&lt;T&gt;' is not assignable to type '(param1: Param1Type) =&gt; BaseClass&lt;T&gt;'.
  </code></pre>
  
  <p>Is it not possible to extend method signatures in typescript? How do I extend the capabilities of the BaseClass if I need to add a parameter to the overridden method and is this the correct way of calling the parent method in es6 syntax. I'm aware that prior to es6 I could have called BaseClass.prototype.doSomething.call(this, param1). </p>