1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
//// [mismatchedGenericArguments1.ts]
interface IFoo<T> {
foo<T>(x: T): T;
}
class C<T> implements IFoo<T> {
foo(x: string): number {
return null;
}
}
class C2<T> implements IFoo<T> {
foo<U>(x: string): number {
return null;
}
}
//// [mismatchedGenericArguments1.js]
var C = /** @class */ (function () {
function C() {
}
C.prototype.foo = function (x) {
return null;
};
return C;
}());
var C2 = /** @class */ (function () {
function C2() {
}
C2.prototype.foo = function (x) {
return null;
};
return C2;
}());
|