Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance Object.assign static method signature #12110

Closed

Conversation

falsandtru
Copy link
Contributor

Fixes #12109

@falsandtru falsandtru force-pushed the lib.d.ts/Object.assign branch from b7ebf78 to c1fd09e Compare November 9, 2016 01:15
@dead-claudia
Copy link

dead-claudia commented Dec 13, 2016

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
Copy link
Contributor

mhegazy commented Dec 13, 2016

@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
@falsandtru falsandtru deleted the lib.d.ts/Object.assign branch December 15, 2016 03:54
@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