2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/contextualTypingOfLambdaWithMultipleSignatures.ts ===
|
|
|
|
interface Foo {
|
2015-04-16 01:44:20 +02:00
|
|
|
>Foo : Foo
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
getFoo(n: number): void;
|
2015-04-16 01:44:20 +02:00
|
|
|
>getFoo : { (n: number): void; (s: string): void; }
|
|
|
|
>n : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
getFoo(s: string): void;
|
2015-04-16 01:44:20 +02:00
|
|
|
>getFoo : { (n: number): void; (s: string): void; }
|
|
|
|
>s : string
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var foo: Foo;
|
2015-04-16 01:44:20 +02:00
|
|
|
>foo : Foo
|
|
|
|
>Foo : Foo
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
foo.getFoo = bar => { };
|
|
|
|
>foo.getFoo = bar => { } : (bar: any) => void
|
2015-04-16 01:44:20 +02:00
|
|
|
>foo.getFoo : { (n: number): void; (s: string): void; }
|
|
|
|
>foo : Foo
|
|
|
|
>getFoo : { (n: number): void; (s: string): void; }
|
2014-08-15 23:33:16 +02:00
|
|
|
>bar => { } : (bar: any) => void
|
2015-04-16 01:44:20 +02:00
|
|
|
>bar : any
|
2014-08-15 23:33:16 +02:00
|
|
|
|