2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/overloadWithCallbacksWithDifferingOptionalityOnArgs.ts ===
|
|
|
|
function x2(callback: (x?: number) => number);
|
2015-04-16 01:44:20 +02:00
|
|
|
>x2 : { (callback: (x?: number) => number): any; (callback: (x: string) => number): any; }
|
|
|
|
>callback : (x?: number) => number
|
|
|
|
>x : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
function x2(callback: (x: string) => number);
|
2015-04-16 01:44:20 +02:00
|
|
|
>x2 : { (callback: (x?: number) => number): any; (callback: (x: string) => number): any; }
|
|
|
|
>callback : (x: string) => number
|
|
|
|
>x : string
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
function x2(callback: (x: any) => number) { }
|
2015-04-16 01:44:20 +02:00
|
|
|
>x2 : { (callback: (x?: number) => number): any; (callback: (x: string) => number): any; }
|
|
|
|
>callback : (x: any) => number
|
|
|
|
>x : any
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
x2(() => 1);
|
|
|
|
>x2(() => 1) : any
|
2015-04-16 01:44:20 +02:00
|
|
|
>x2 : { (callback: (x?: number) => number): any; (callback: (x: string) => number): any; }
|
2014-08-15 23:33:16 +02:00
|
|
|
>() => 1 : () => number
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
x2((x) => 1 );
|
|
|
|
>x2((x) => 1 ) : any
|
2015-04-16 01:44:20 +02:00
|
|
|
>x2 : { (callback: (x?: number) => number): any; (callback: (x: string) => number): any; }
|
2014-08-15 23:33:16 +02:00
|
|
|
>(x) => 1 : (x: number) => number
|
2015-04-16 01:44:20 +02:00
|
|
|
>x : number
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|