title: Typescript infer function parameters in derived class
body: <p>I noticed that when implementing a generic interface (or class) and explicitly stating the types of those generics, the parameter types for functions inside the subclass are not inferred.</p>
  
  <pre><code>interface MyInterface&lt;T&gt; {
      open(data: T): void
  }
  
  class MyClass implements MyInterface&lt;string&gt; {
      open(data) {
          // Data should be string, but is any
      }
  }
  </code></pre>
  
  <p>The current correct way to do this would be the following:</p>
  
  <pre><code>open(data: string) {
      ...
  }
  </code></pre>
  
  <p>However, this forces me to enter the type multiple times which seems unnecessary. The following produces an error (which is expected): </p>
  
  <pre><code>open(data: number) {
      ...
  }
  </code></pre>
  
  <p>Any type that isn't string gives an error, so shouldn't the compiler be able to infer that the type is string?</p>