Skip to content

Improve spread helper emit#12304

Merged
sandersn merged 3 commits intomasterfrom
improve-spread-helper-emit
Nov 16, 2016
Merged

Improve spread helper emit#12304
sandersn merged 3 commits intomasterfrom
improve-spread-helper-emit

Conversation

@sandersn
Copy link
Member

Since __assign defaults to Object.assign if present, our own helper will never be used in ES6 and higher, and getOwnPropertySymbols is not needed in ES5 and below because symbols don't exist there.

Since __assign defaults to Object.assign if present, our own helper will
never be used in ES6 and higher, and `getOwnPropertySymbols` is not
needed in ES5 and below because symbols don't exist there.
@sandersn
Copy link
Member Author

@rbuckton here's the __assign improvement you suggested.

@rbuckton
Copy link
Contributor

rbuckton commented Nov 16, 2016

@sandersn Can you merge master now that #11874 and #12250 are in master? The location of the __assign helper has changed.

@sandersn
Copy link
Member Author

Sure. Done.

@sandersn sandersn merged commit 6a13fda into master Nov 16, 2016
@sandersn sandersn deleted the improve-spread-helper-emit branch November 16, 2016 20:35
@mihailik
Copy link
Contributor

The premise is not strictly true. Object.assign and Object.getOwnPropertySymbols may be polyfilled (one of them or both).

It's safer to feature-detect each on separately, rather than rely on presence of one as a clue to another.

@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