Closed
Description
TypeScript Version: 3.0.0-dev.201xxxxx
Search Terms:
The changes from #25140, did not seem to work on function calls.
Code
type Options = { x: number, y: string };
declare function foo(options: Options): void;
foo({ x: 1, y: 10 });
// ^^^^^^^^^^^^^^^
// Argument of type '{ x: number; y: number; }' is not assignable to parameter of type 'Options'.
// Types of property 'y' are incompatible.
// Type 'number' is not assignable to type 'string'.
var m: Options;
m = { x: 1, y: 2 };
// ^
// Type 'number' is not assignable to type 'string'.
Expected behavior:
Actual behavior:
Playground Link:
Related Issues: