2014-07-13 01:04:16 +02:00
|
|
|
//// [overloadWithCallbacksWithDifferingOptionalityOnArgs.ts]
|
|
|
|
function x2(callback: (x?: number) => number);
|
|
|
|
function x2(callback: (x: string) => number);
|
|
|
|
function x2(callback: (x: any) => number) { }
|
|
|
|
x2(() => 1);
|
|
|
|
x2((x) => 1 );
|
|
|
|
|
|
|
|
|
|
|
|
//// [overloadWithCallbacksWithDifferingOptionalityOnArgs.js]
|
2015-03-26 21:46:35 +01:00
|
|
|
function x2(callback) { }
|
|
|
|
x2(function () { return 1; });
|
|
|
|
x2(function (x) { return 1; });
|