tests/cases/compiler/implementGenericWithMismatchedTypes.ts(7,7): error TS2420: Class 'C' incorrectly implements interface 'IFoo'. Types of property 'foo' are incompatible. Type '(x: string) => number' is not assignable to type '(x: T) => T'. Types of parameters 'x' and 'x' are incompatible. Type 'string' is not assignable to type 'T'. tests/cases/compiler/implementGenericWithMismatchedTypes.ts(16,7): error TS2420: Class 'C2' incorrectly implements interface 'IFoo2'. Types of property 'foo' are incompatible. Type '(x: Tstring) => number' is not assignable to type '(x: T) => T'. Type 'number' is not assignable to type 'T'. ==== tests/cases/compiler/implementGenericWithMismatchedTypes.ts (2 errors) ==== // no errors because in the derived types the best common type for T's value is Object // and that matches the original signature for assignability since we treat its T's as Object interface IFoo { foo(x: T): T; } class C implements IFoo { // error ~ !!! error TS2420: Class 'C' incorrectly implements interface 'IFoo'. !!! error TS2420: Types of property 'foo' are incompatible. !!! error TS2420: Type '(x: string) => number' is not assignable to type '(x: T) => T'. !!! error TS2420: Types of parameters 'x' and 'x' are incompatible. !!! error TS2420: Type 'string' is not assignable to type 'T'. foo(x: string): number { return null; } } interface IFoo2 { foo(x: T): T; } class C2 implements IFoo2 { // error ~~ !!! error TS2420: Class 'C2' incorrectly implements interface 'IFoo2'. !!! error TS2420: Types of property 'foo' are incompatible. !!! error TS2420: Type '(x: Tstring) => number' is not assignable to type '(x: T) => T'. !!! error TS2420: Type 'number' is not assignable to type 'T'. foo(x: Tstring): number { return null; } }