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

26 lines
594 B
Plaintext

=== tests/cases/compiler/contextualTypingOfLambdaWithMultipleSignatures.ts ===
interface Foo {
>Foo : Foo
getFoo(n: number): void;
>getFoo : { (n: number): void; (s: string): void; }
>n : number
getFoo(s: string): void;
>getFoo : { (n: number): void; (s: string): void; }
>s : string
}
var foo: Foo;
>foo : Foo
>Foo : Foo
foo.getFoo = bar => { };
>foo.getFoo = bar => { } : (bar: any) => void
>foo.getFoo : { (n: number): void; (s: string): void; }
>foo : Foo
>getFoo : { (n: number): void; (s: string): void; }
>bar => { } : (bar: any) => void
>bar : any