You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a endpoint utility where I create endpoint contracts for APIs but currently when defining zod schemas I cannot re-use them for other places where I could to avoid duplication. The resulting type of zod schema seems to be lost somewhere alongside cant figure it out where and how to make it work whilst preserving the logic for defining endpoint props.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a endpoint utility where I create endpoint contracts for APIs but currently when defining zod schemas I cannot re-use them for other places where I could to avoid duplication. The resulting type of zod schema seems to be lost somewhere alongside cant figure it out where and how to make it work whilst preserving the logic for defining endpoint props.
https://tsplay.dev/mbbPBm
Can someone guide me how can I achieve this?
Beta Was this translation helpful? Give feedback.
All reactions