Passing a variable that holds an array of schemas into z.discriminatedUnion() fails
#2819
gahabeen
started this conversation in
Show and tell
Replies: 2 comments 2 replies
-
|
What are you wanting to be done about this? Or are you just posting it so other people can use your solution? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I'd have expected to work out of the batch. Or am I wrong that it should work? 🤔 |
Beta Was this translation helpful? Give feedback.
2 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.
-
Description
Passing a variable that holds an array of schemas to a
z.discriminatedUnion()isn't possible on[email protected].📍 Run the issue
would prompt
Source provides no match for required element at position 0 in targeterror.✅ By-pass it
Manually structuring the first item of the array and spreading the rest for the win 🤟
Beta Was this translation helpful? Give feedback.
All reactions