2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/functionOverloads15.ts ===
|
|
|
|
function foo(foo:{a:string; b:number;}):string;
|
2015-04-16 01:44:20 +02:00
|
|
|
>foo : { (foo: { a: string; b: number; }): string; (foo: { a: string; b: number; }): number; }
|
|
|
|
>foo : { a: string; b: number; }
|
|
|
|
>a : string
|
|
|
|
>b : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
function foo(foo:{a:string; b:number;}):number;
|
2015-04-16 01:44:20 +02:00
|
|
|
>foo : { (foo: { a: string; b: number; }): string; (foo: { a: string; b: number; }): number; }
|
|
|
|
>foo : { a: string; b: number; }
|
|
|
|
>a : string
|
|
|
|
>b : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
function foo(foo:{a:string; b?:number;}):any { return "" }
|
2015-04-16 01:44:20 +02:00
|
|
|
>foo : { (foo: { a: string; b: number; }): string; (foo: { a: string; b: number; }): number; }
|
|
|
|
>foo : { a: string; b?: number; }
|
|
|
|
>a : string
|
|
|
|
>b : number
|
2015-04-13 21:36:11 +02:00
|
|
|
>"" : string
|
2014-08-15 23:33:16 +02:00
|
|
|
|