-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Error MessagesThe issue relates to error messagingThe issue relates to error messagingFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
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:
DanielRosenwasser and CyrusNajmabadi
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Error MessagesThe issue relates to error messagingThe issue relates to error messagingFixedA PR has been merged for this issueA PR has been merged for this issue