-
-
Notifications
You must be signed in to change notification settings - Fork 531
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
Proposal: RequiredDeep
#273
Comments
What's the use-case? |
In my application I have the concept of an "in progress" form which is stored in one DB table, and then the "completed and finalized" form data which is stored in another DB table. The schemas are expressed as Zod schemas and saved in the database as JSON blobs (since the schema is still in flux and we wanted flexibility). Some data is nested, some are optional in that in-progress form and some are not, but the thing that's definitely true is that all leaves need to be there in the finalized version of the form data. So it's more ergonomic for me to express that type as a deeply required version of the in-progress form. There are other ways around it but yeah figured that I'm not the only person who might have some usecase for this kind of type. |
Makes sense. Accepted. |
If anyone wants to work on this, see the initial attempt and feedback: #401 |
similar to PartialDeep but the inverse, where all KV pairs are required.
The text was updated successfully, but these errors were encountered: