//// [overEagerReturnTypeSpecialization.ts] //Note: Below simpler repro interface I1 { func(callback: (value: T) => U): I1; } declare var v1: I1; var r1: I1 = v1.func(num => num.toString()) // Correctly returns an I1 .func(str => str.length); // should error var r2: I1 = v1.func(num => num.toString()) // Correctly returns an I1 .func(str => str.length); // should be ok //// [overEagerReturnTypeSpecialization.js] //Note: Below simpler repro var r1 = v1.func(function (num) { return num.toString(); }) // Correctly returns an I1 .func(function (str) { return str.length; }); // should error var r2 = v1.func(function (num) { return num.toString(); }) // Correctly returns an I1 .func(function (str) { return str.length; }); // should be ok