TypeScript/tests/baselines/reference/contextualTypingOfObjectLiterals2.errors.txt
2014-09-12 13:35:07 -07:00

11 lines
483 B
Plaintext

tests/cases/compiler/contextualTypingOfObjectLiterals2.ts(5,18): error TS2339: Property 'hmm' does not exist on type 'string'.
==== tests/cases/compiler/contextualTypingOfObjectLiterals2.ts (1 errors) ====
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
~~~
!!! error TS2339: Property 'hmm' does not exist on type 'string'.