12 lines
279 B
TypeScript
12 lines
279 B
TypeScript
//// [contextualTypingOfLambdaWithMultipleSignatures.ts]
|
|
interface Foo {
|
|
getFoo(n: number): void;
|
|
getFoo(s: string): void;
|
|
}
|
|
|
|
var foo: Foo;
|
|
foo.getFoo = bar => { };
|
|
|
|
//// [contextualTypingOfLambdaWithMultipleSignatures.js]
|
|
var foo;
|
|
foo.getFoo = function (bar) { };
|