19 lines
462 B
Text
19 lines
462 B
Text
=== tests/cases/compiler/functionOverloads26.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 x = foo('baz');
|
|
>x : number
|
|
>foo('baz') : number
|
|
>foo : { (): string; (bar: string): number; }
|
|
>'baz' : string
|
|
|