mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
14 lines
439 B
TypeScript
14 lines
439 B
TypeScript
//// [tests/cases/compiler/contextualTypingOfObjectLiterals2.ts] ////
|
|
|
|
//// [contextualTypingOfObjectLiterals2.ts]
|
|
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
|
|
|
|
//// [contextualTypingOfObjectLiterals2.js]
|
|
"use strict";
|
|
function f2(args) { }
|
|
f2({ foo: s => s.hmm }); // 's' should be 'string', so this should be an error
|