18 lines
979 B
Text
18 lines
979 B
Text
=== tests/cases/compiler/functionOverloads28.ts ===
|
|
function foo():string;
|
|
>foo : Symbol(foo, Decl(functionOverloads28.ts, 0, 0), Decl(functionOverloads28.ts, 0, 22), Decl(functionOverloads28.ts, 1, 32))
|
|
|
|
function foo(bar:string):number;
|
|
>foo : Symbol(foo, Decl(functionOverloads28.ts, 0, 0), Decl(functionOverloads28.ts, 0, 22), Decl(functionOverloads28.ts, 1, 32))
|
|
>bar : Symbol(bar, Decl(functionOverloads28.ts, 1, 13))
|
|
|
|
function foo(bar?:any):any{ return '' }
|
|
>foo : Symbol(foo, Decl(functionOverloads28.ts, 0, 0), Decl(functionOverloads28.ts, 0, 22), Decl(functionOverloads28.ts, 1, 32))
|
|
>bar : Symbol(bar, Decl(functionOverloads28.ts, 2, 13))
|
|
|
|
var t:any; var x = foo(t);
|
|
>t : Symbol(t, Decl(functionOverloads28.ts, 3, 3))
|
|
>x : Symbol(x, Decl(functionOverloads28.ts, 3, 14))
|
|
>foo : Symbol(foo, Decl(functionOverloads28.ts, 0, 0), Decl(functionOverloads28.ts, 0, 22), Decl(functionOverloads28.ts, 1, 32))
|
|
>t : Symbol(t, Decl(functionOverloads28.ts, 3, 3))
|
|
|