2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/functionOverloads14.ts ===
|
|
|
|
function foo():{a:number;}
|
2015-04-13 23:01:57 +02:00
|
|
|
>foo : { (): { a: number; }; (): { a: string; }; }, Symbol(foo, Decl(functionOverloads14.ts, 0, 0), Decl(functionOverloads14.ts, 0, 26), Decl(functionOverloads14.ts, 1, 26))
|
|
|
|
>a : number, Symbol(a, Decl(functionOverloads14.ts, 0, 16))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
function foo():{a:string;}
|
2015-04-13 23:01:57 +02:00
|
|
|
>foo : { (): { a: number; }; (): { a: string; }; }, Symbol(foo, Decl(functionOverloads14.ts, 0, 0), Decl(functionOverloads14.ts, 0, 26), Decl(functionOverloads14.ts, 1, 26))
|
|
|
|
>a : string, Symbol(a, Decl(functionOverloads14.ts, 1, 16))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
function foo():{a:any;} { return {a:1} }
|
2015-04-13 23:01:57 +02:00
|
|
|
>foo : { (): { a: number; }; (): { a: string; }; }, Symbol(foo, Decl(functionOverloads14.ts, 0, 0), Decl(functionOverloads14.ts, 0, 26), Decl(functionOverloads14.ts, 1, 26))
|
|
|
|
>a : any, Symbol(a, Decl(functionOverloads14.ts, 2, 16))
|
2014-08-15 23:33:16 +02:00
|
|
|
>{a:1} : { a: number; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>a : number, Symbol(a, Decl(functionOverloads14.ts, 2, 34))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|