Skip to content
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

refactor(object-spread): use spread instead of assign #194

Merged
merged 2 commits into from
Dec 24, 2018

Conversation

liangchunn
Copy link
Contributor

Just following up from #166 and #169:

Since we've already dropped support for Node 6 in #166, object spread properties can now be safely used. (As briefly discussed here)

In .eslintrc.json, "experimentalObjectRestSpread": true and "ecmaVersion": 6 should be kept, since Node 8 supports 99% of ES2015 features, and object-spread is just a ES2018 feature, but is fully supported in Node 8 and above. (Also mentioned in #169, here)


Note: This PR does not introduce any functionality changes

@johnnyreilly
Copy link
Member

Nice - either way; we transpile typescript down to es2015 so the object-spread can happily be used since (I believe) it gets transpiled into Object.assign anyway. But yeah - completely happy with these changes. Do you want update the version number in package.json / add an entry to CHANGELOG.md and I'll merge this. This can go out as alpha.1 I guess.

@liangchunn
Copy link
Contributor Author

we transpile typescript down to es2015 so the object-spread can happily be used since (I believe) it gets transpiled into Object.assign anyway.

Yep! This only impacts test files, and just making them look nicer. Either way we could push this as alpha, or not at all. (Up to you, I don't really mind 😄)

@johnnyreilly johnnyreilly merged commit 51981e7 into TypeStrong:master Dec 24, 2018
@johnnyreilly
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants