26 lines
594 B
Text
26 lines
594 B
Text
|
=== 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
|
||
|
|