Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Implement clone method#97

Merged
talyssonoc merged 6 commits intomasterfrom
implement-clone-method
Sep 14, 2019
Merged

Implement clone method#97
talyssonoc merged 6 commits intomasterfrom
implement-clone-method

Conversation

@talyssonoc
Copy link
Owner

No description provided.

Copy link

@loweoj loweoj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about cloning nested structures?

@talyssonoc
Copy link
Owner Author

@loweoj you can do it explicitly:

const clonedUser = user.clone({ favoriteBook: user.favoriteBook.clone() })

I want to leave it open that way for cases when you want to clone some of the nested structures but not others, this is the most general case.

@talyssonoc talyssonoc force-pushed the implement-clone-method branch from 7171274 to 4be5226 Compare September 13, 2019 14:08
negreirosleo
negreirosleo previously approved these changes Sep 13, 2019
@talyssonoc talyssonoc merged commit a58b63c into master Sep 14, 2019
@talyssonoc talyssonoc deleted the implement-clone-method branch September 14, 2019 14:23
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.

3 participants