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