22 lines
1.2 KiB
Text
22 lines
1.2 KiB
Text
=== tests/cases/compiler/functionOverloads42.ts ===
|
|
function foo(bar:{a:number;}[]):string;
|
|
>foo : Symbol(foo, Decl(functionOverloads42.ts, 0, 0), Decl(functionOverloads42.ts, 0, 39), Decl(functionOverloads42.ts, 1, 36))
|
|
>bar : Symbol(bar, Decl(functionOverloads42.ts, 0, 13))
|
|
>a : Symbol(a, Decl(functionOverloads42.ts, 0, 18))
|
|
|
|
function foo(bar:{a:any;}[]):number;
|
|
>foo : Symbol(foo, Decl(functionOverloads42.ts, 0, 0), Decl(functionOverloads42.ts, 0, 39), Decl(functionOverloads42.ts, 1, 36))
|
|
>bar : Symbol(bar, Decl(functionOverloads42.ts, 1, 13))
|
|
>a : Symbol(a, Decl(functionOverloads42.ts, 1, 18))
|
|
|
|
function foo(bar:{a:any;}[]):any{ return bar }
|
|
>foo : Symbol(foo, Decl(functionOverloads42.ts, 0, 0), Decl(functionOverloads42.ts, 0, 39), Decl(functionOverloads42.ts, 1, 36))
|
|
>bar : Symbol(bar, Decl(functionOverloads42.ts, 2, 13))
|
|
>a : Symbol(a, Decl(functionOverloads42.ts, 2, 18))
|
|
>bar : Symbol(bar, Decl(functionOverloads42.ts, 2, 13))
|
|
|
|
var x = foo([{a:'s'}]);
|
|
>x : Symbol(x, Decl(functionOverloads42.ts, 3, 3))
|
|
>foo : Symbol(foo, Decl(functionOverloads42.ts, 0, 0), Decl(functionOverloads42.ts, 0, 39), Decl(functionOverloads42.ts, 1, 36))
|
|
>a : Symbol(a, Decl(functionOverloads42.ts, 3, 14))
|
|
|