20 lines
468 B
Text
20 lines
468 B
Text
=== tests/cases/compiler/functionOverloads28.ts ===
|
|
function foo():string;
|
|
>foo : { (): string; (bar: string): number; }
|
|
|
|
function foo(bar:string):number;
|
|
>foo : { (): string; (bar: string): number; }
|
|
>bar : string
|
|
|
|
function foo(bar?:any):any{ return '' }
|
|
>foo : { (): string; (bar: string): number; }
|
|
>bar : any
|
|
>'' : string
|
|
|
|
var t:any; var x = foo(t);
|
|
>t : any
|
|
>x : number
|
|
>foo(t) : number
|
|
>foo : { (): string; (bar: string): number; }
|
|
>t : any
|
|
|