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

Record spread syntax #778

Closed
ospencer opened this issue Jul 11, 2021 · 1 comment · Fixed by #1565
Closed

Record spread syntax #778

ospencer opened this issue Jul 11, 2021 · 1 comment · Fixed by #1565
Assignees
Labels

Comments

@ospencer
Copy link
Member

I forget, do we have record spread syntax? { ...config, caseSensitive: caseSensitive } (caseSensitive could also be punned)

Originally posted by @phated in #680 (comment)

@peblair peblair added the syntax label Jul 11, 2021
@alex-snezhko
Copy link
Member

Would this syntax be constrained to only creating records of the same type but with some values changed (like with in OCaml) or could it be used to create a record of one type from another that has a subset of the fields? For example in JS you could do {...first, ...second} to "merge" two objects together, which can be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants