Skip to content

Improve spread helper emit #12304

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

Merged
merged 3 commits into from
Nov 16, 2016
Merged

Improve spread helper emit #12304

merged 3 commits into from
Nov 16, 2016

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
Member

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