TypeScript/tests/baselines/reference/overloadCallTest.types
2015-04-15 16:44:20 -07:00

40 lines
791 B
Plaintext

=== tests/cases/compiler/overloadCallTest.ts ===
class foo {
>foo : foo
constructor() {
function bar(): string;
>bar : { (): string; (s: string): any; }
function bar(s:string);
>bar : { (): string; (s: string): any; }
>s : string
function bar(foo?: string) { return "foo" };
>bar : { (): string; (s: string): any; }
>foo : string
>"foo" : string
var test = bar("test");
>test : any
>bar("test") : any
>bar : { (): string; (s: string): any; }
>"test" : string
var goo = bar();
>goo : string
>bar() : string
>bar : { (): string; (s: string): any; }
goo = bar("test");
>goo = bar("test") : any
>goo : string
>bar("test") : any
>bar : { (): string; (s: string): any; }
>"test" : string
}
}