8 lines
337 B
Plaintext
8 lines
337 B
Plaintext
|
==== 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
|
||
|
~~~
|
||
|
!!! Property 'hmm' does not exist on type 'string'.
|