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-02-07 03:45:09 +01:00
|
|
|
function x2(callback) { }
|
2014-07-13 01:04:16 +02:00
|
|
|
x2(function () { return 1; });
|
|
|
|
x2(function (x) { return 1; });
|