TypeScript/tests/cases/compiler/contextualTypingOfObjectLiterals2.ts
2014-07-12 17:30:19 -07:00

5 lines
158 B
TypeScript

interface Foo {
foo: (t: string) => string;
}
function f2(args: Foo) { }
f2({ foo: s => s.hmm }) // 's' should be 'string', so this should be an error