Skip to content

Enhance Object.assign static method signature#12110

Closed
falsandtru wants to merge 1 commit into
microsoft:masterfrom
falsandtru:lib.d.ts/Object.assign
Closed

Enhance Object.assign static method signature#12110
falsandtru wants to merge 1 commit into
microsoft:masterfrom
falsandtru:lib.d.ts/Object.assign

Conversation

@falsandtru

Copy link
Copy Markdown
Contributor

Fixes #12109

@dead-claudia

dead-claudia commented Dec 13, 2016

Copy link
Copy Markdown

There's a glitch: Object.assign mutates the target assignee directly. So it should really look something like this (which is actually correct mod a missing object | Function type constraint where object is implemented in this PR):

interface Object {
    assign<T>(target: T, ...sources: Partial<T>): T;
}

@mhegazy

mhegazy commented Dec 13, 2016

Copy link
Copy Markdown
Contributor

@sandersn is working on a fix for this as tracked by #11100. I would rather wait for that change.

@mhegazy mhegazy closed this Dec 13, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants