-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
Allow DeepReadonly to be applied more than once #106
Comments
It appears that changing |
aaronjensen
added a commit
to aaronjensen/utility-types
that referenced
this issue
Oct 1, 2019
aaronjensen
added a commit
to aaronjensen/utility-types
that referenced
this issue
Oct 1, 2019
8 tasks
piotrwitek
pushed a commit
that referenced
this issue
Oct 4, 2019
* Allow recursively applying DeepReadonly fixes #106 * Tag things made deepReadonly and do not recurse them again * Use infer to make DeepReadonly idempotent * Address feedback
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a real problem or use-case?
I'm building a redux state type from other existing types. For some of the child types, we'll want to use
DeepReadonly
to make them immutable. Then, at the very top level (the combined state) I want to useDeepReadonly
again to ensure that everything is actually immutable.Unfortunately, this double application causes issues in some instances:
Describe a solution including usage in code example
Though the above example is contrived, it's sufficient to demonstrate the issue.
Who does this impact? Who is this for?
All who are combining multiple potentially readonly things into one readonly thing.
Describe alternatives you've considered (optional)
Only applying DeepReadonly at the very top, which is what I'm doing for now, but makes for more work.
Additional context (optional)
N/A
The text was updated successfully, but these errors were encountered: