TypeScript/tests/baselines/reference/functionOverloads7.types

38 lines
769 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/functionOverloads7.ts ===
class foo {
>foo : foo
2014-08-15 23:33:16 +02:00
private bar();
>bar : { (): any; (foo: string): any; }
2014-08-15 23:33:16 +02:00
private bar(foo: string);
>bar : { (): any; (foo: string): any; }
>foo : string
2014-08-15 23:33:16 +02:00
private bar(foo?: any){ return "foo" }
>bar : { (): any; (foo: string): any; }
>foo : any
2015-04-13 21:36:11 +02:00
>"foo" : string
2014-08-15 23:33:16 +02:00
public n() {
>n : () => void
2014-08-15 23:33:16 +02:00
var foo = this.bar();
>foo : any
2014-08-15 23:33:16 +02:00
>this.bar() : any
>this.bar : { (): any; (foo: string): any; }
>this : foo
>bar : { (): any; (foo: string): any; }
2014-08-15 23:33:16 +02:00
foo = this.bar("test");
>foo = this.bar("test") : any
>foo : any
2014-08-15 23:33:16 +02:00
>this.bar("test") : any
>this.bar : { (): any; (foo: string): any; }
>this : foo
>bar : { (): any; (foo: string): any; }
2015-04-13 21:36:11 +02:00
>"test" : string
2014-08-15 23:33:16 +02:00
}
}