Skip to content

Object.assign not type checking #11100

Closed
Closed
@OliverJAsh

Description

@OliverJAsh

TS 2.0.3

Given:

(() => {
    type State = { foo: string };
    const state: State = { foo: 'bar' };
    const newState: State = Object.assign({}, state, { foo: 1 }) // I expect this to error
})();

I swear this used to work!

Metadata

Metadata

Assignees

Labels

DuplicateAn existing issue was already createdSuggestionAn idea for TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions