-
-
Notifications
You must be signed in to change notification settings - Fork 506
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
Add Mutable
type
#157
Add Mutable
type
#157
Conversation
Hello, nice work, is there a plan to create |
Sure. Open an issue or PR about it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for not reviewing earlier, I had my notifications for this repo setup in a way that made me miss the request for reviews.
My "request changes" isn't for all of my comments, but mostly for things like the erroneous comments in the test file.
As a new co-maintainer on this repo I'm still figuring out some things myself.
Co-authored-by: Pelle Wessman <pelle@kodfabrik.se>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, you're fast, I only had time to review #153 and then I'm back to this one 😅
Well, here's some follow up thoughts
Co-authored-by: Pelle Wessman <pelle@kodfabrik.se>
Co-authored-by: Pelle Wessman <pelle@kodfabrik.se>
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
… into set-mutable
What do you think of also making |
This sounds useful to me. @sindresorhus thoughts? |
I think we should open a separate issue / PR for accepting arrays into Mutable, to keep this PR as focused as possible so we can get it reviewed and merged without too much effort 😉 Sorry for lagging with my re-review, I’m a bit behind at work right now. |
Agreed: #176 |
@voxpelli LGTY? |
Actually, I missed that the tests are failing. You need to fix those. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
@sindresorhus Do you want me to merge? |
Sure, go ahead. |
Fixes #146
SetMutable
Creates a type that converts the given keys from
readonly
to mutable. The remaining keys are kept as is.Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are mutable.