-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
chore: replace as many Object.assign
with object spread as possible
#7627
Conversation
IIRC someone at v8 was working on it recently, but the last time I checked object spread was still slower than |
It's transpiled to babel's implementation anyways, so doesn't matter: https://github.com/babel/babel/blob/694e3fd8cf321988c0f1d97e59a3df77adabad5b/packages/babel-helpers/src/helpers.js#L387-L405 We could use That said, https://twitter.com/bmeurer/status/1015105293301280768?lang=en |
Oh, for some reason I though object spread was introduced in Node 6, but I looked it up and it's 8+, so you're right, it'll be transpiled. |
Yeah! Also easier for type systems (as you can see, I was able to remove quite a few |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
We use
@babel/preset-env
now, so this is safe.Test plan
Green CI