TypeScript/tests/baselines/reference/functionOverloads26.types
2014-08-25 10:55:22 -07:00

17 lines
319 B
Text

=== tests/cases/compiler/functionOverloads26.ts ===
function foo():string;
>foo : typeof foo
function foo(bar:string):number;
>foo : typeof foo
>bar : string
function foo(bar?:any):any{ return '' }
>foo : typeof foo
>bar : any
var x = foo('baz');
>x : number
>foo('baz') : number
>foo : typeof foo