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-envnow, so this is safe.Test plan
Green CI