How do you get the sub-schema of a schema? #653
Unanswered
matthew-dean
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Each schema is fully accessible. You can access the entries of the object schema via const NewSchema = object({
id: optional(Schema.entries.id)
}); |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Say I have this:
Now I want to do this:
I can't find anything in the documentation about this. (Note, this is obviously over-simplified, and I know I could do
optional(string())
but the actual sub-schema will be much more complicated.)Beta Was this translation helpful? Give feedback.
All reactions