TypeScript/tests/baselines/reference/functionOverloads15.types
2015-04-15 16:44:20 -07:00

21 lines
700 B
Plaintext

=== tests/cases/compiler/functionOverloads15.ts ===
function foo(foo:{a:string; b:number;}):string;
>foo : { (foo: { a: string; b: number; }): string; (foo: { a: string; b: number; }): number; }
>foo : { a: string; b: number; }
>a : string
>b : number
function foo(foo:{a:string; b:number;}):number;
>foo : { (foo: { a: string; b: number; }): string; (foo: { a: string; b: number; }): number; }
>foo : { a: string; b: number; }
>a : string
>b : number
function foo(foo:{a:string; b?:number;}):any { return "" }
>foo : { (foo: { a: string; b: number; }): string; (foo: { a: string; b: number; }): number; }
>foo : { a: string; b?: number; }
>a : string
>b : number
>"" : string