8000 Errors not reported on properties inside function calls · Issue #25695 · microsoft/TypeScript · GitHub
[go: up one dir, main page]

Skip to content
Errors not reported on properties inside function calls #25695
Closed
@mhegazy

Description

@mhegazy

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:

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: Error MessagesThe issue relates to error messagingFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0