core
core copied to clipboard
TypeScript: abstract method implemented with the wrong type parameter
This is what the above translates to (stripped to show the issue):
class ClassA<T0> { Z(x?:T0):T0 { return; } }
class ClassB<T0, T1> extends ClassA<T1> { Z(x?:T0):T0 { return x; } }
Note how ClassB extends ClassA<T1> but its Z is still declared as taking and returning T0; it should be T1 instead.