2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/functionOverloads7.ts ===
|
|
|
|
class foo {
|
2015-04-16 01:44:20 +02:00
|
|
|
>foo : foo
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
private bar();
|
2015-04-16 01:44:20 +02:00
|
|
|
>bar : { (): any; (foo: string): any; }
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
private bar(foo: string);
|
2015-04-16 01:44:20 +02:00
|
|
|
>bar : { (): any; (foo: string): any; }
|
|
|
|
>foo : string
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
private bar(foo?: any){ return "foo" }
|
2015-04-16 01:44:20 +02:00
|
|
|
>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() {
|
2015-04-16 01:44:20 +02:00
|
|
|
>n : () => void
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var foo = this.bar();
|
2015-04-16 01:44:20 +02:00
|
|
|
>foo : any
|
2014-08-15 23:33:16 +02:00
|
|
|
>this.bar() : any
|
2015-04-16 01:44:20 +02:00
|
|
|
>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
|
2015-04-16 01:44:20 +02:00
|
|
|
>foo : any
|
2014-08-15 23:33:16 +02:00
|
|
|
>this.bar("test") : any
|
2015-04-16 01:44:20 +02:00
|
|
|
>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
|
|
|
}
|
|
|
|
}
|
|
|
|
|