TypeScript/tests/baselines/reference/overloadWithCallbacksWithDifferingOptionalityOnArgs.types

30 lines
1,007 B
Plaintext
Raw Normal View History

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