TypeScript/tests/baselines/reference/functionOverloads25.types

19 lines
436 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/functionOverloads25.ts ===
function foo():string;
>foo : { (): string; (bar: string): number; }
2014-08-15 23:33:16 +02:00
function foo(bar:string):number;
>foo : { (): string; (bar: string): number; }
>bar : string
2014-08-15 23:33:16 +02:00
function foo(bar?:any):any{ return '' };
>foo : { (): string; (bar: string): number; }
>bar : any
2015-04-13 21:36:11 +02:00
>'' : string
2014-08-15 23:33:16 +02:00
var x = foo();
>x : string
2014-08-15 23:33:16 +02:00
>foo() : string
>foo : { (): string; (bar: string): number; }
2014-08-15 23:33:16 +02:00