Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Enhance Object.assign static method signature#12110

Closed
falsandtru wants to merge 1 commit into
microsoft:mastermicrosoft/TypeScript:masterfrom
falsandtru:lib.d.ts/Object.assignfalsandtru/TypeScript:lib.d.ts/Object.assignCopy head branch name to clipboard
Closed

Enhance Object.assign static method signature#12110
falsandtru wants to merge 1 commit into
microsoft:mastermicrosoft/TypeScript:masterfrom
falsandtru:lib.d.ts/Object.assignfalsandtru/TypeScript:lib.d.ts/Object.assignCopy head branch name to clipboard

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.