//// [genericCallToOverloadedMethodWithOverloadedArguments.ts] module m1 { interface Promise { then(cb: (x: T) => Promise): Promise; } declare function testFunction(n: number): Promise; var numPromise: Promise; var newPromise = numPromise.then(testFunction); } ////////////////////////////////////// module m2 { interface Promise { then(cb: (x: T) => Promise): Promise; } declare function testFunction(n: number): Promise; declare function testFunction(s: string): Promise; var numPromise: Promise; var newPromise = numPromise.then(testFunction); } ////////////////////////////////////// module m3 { interface Promise { then(cb: (x: T) => Promise): Promise; then(cb: (x: T) => Promise, error?: (error: any) => Promise): Promise; } declare function testFunction(n: number): Promise; var numPromise: Promise; var newPromise = numPromise.then(testFunction); } ////////////////////////////////////// module m4 { interface Promise { then(cb: (x: T) => Promise): Promise; then(cb: (x: T) => Promise, error?: (error: any) => Promise): Promise; } declare function testFunction(n: number): Promise; declare function testFunction(s: string): Promise; var numPromise: Promise; var newPromise = numPromise.then(testFunction); } ////////////////////////////////////// module m5 { interface Promise { then(cb: (x: T) => Promise): Promise; then(cb: (x: T) => Promise, error?: (error: any) => Promise): Promise; then(cb: (x: T) => Promise, error?: (error: any) => U, progress?: (preservation: any) => void): Promise; } declare function testFunction(n: number): Promise; declare function testFunction(s: string): Promise; var numPromise: Promise; var newPromise = numPromise.then(testFunction); } ////////////////////////////////////// module m6 { interface Promise { then(cb: (x: T) => Promise): Promise; then(cb: (x: T) => Promise, error?: (error: any) => Promise): Promise; } declare function testFunction(n: number): Promise; declare function testFunction(s: string): Promise; declare function testFunction(b: boolean): Promise; var numPromise: Promise; var newPromise = numPromise.then(testFunction); } //// [genericCallToOverloadedMethodWithOverloadedArguments.js] var m1; (function (m1) { var numPromise; var newPromise = numPromise.then(testFunction); })(m1 || (m1 = {})); ////////////////////////////////////// var m2; (function (m2) { var numPromise; var newPromise = numPromise.then(testFunction); })(m2 || (m2 = {})); ////////////////////////////////////// var m3; (function (m3) { var numPromise; var newPromise = numPromise.then(testFunction); })(m3 || (m3 = {})); ////////////////////////////////////// var m4; (function (m4) { var numPromise; var newPromise = numPromise.then(testFunction); })(m4 || (m4 = {})); ////////////////////////////////////// var m5; (function (m5) { var numPromise; var newPromise = numPromise.then(testFunction); })(m5 || (m5 = {})); ////////////////////////////////////// var m6; (function (m6) { var numPromise; var newPromise = numPromise.then(testFunction); })(m6 || (m6 = {}));