TypeScript/tests/cases/compiler/contextualTypingOfObjectLiterals2.ts

5 lines
158 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
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