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
Hey all -- I was playing around with ZodPromise and hoping to add this functionality in a PR. I checked out the CONTRIBUTING.md first and it asked I open an issue. So here I am....
ZodPromise is created with a second Zod type that is checked when the promise resolves. I'd like to be able to access the schema the ZodPromise was created with. For example
import{z}from'zod';constFoo=z.literal('foo')constMyPromise=z.promise(Foo)MyPromise.resolves()// should be a method that returns the Foo schema declared above
I'm not sure there is a way to do this at the moment and I'm open to suggestions on variable naming and such. If this is something that makes sense to PR I can draft something but looking for some feedback first. Thanks.
The text was updated successfully, but these errors were encountered:
Hey all -- I was playing around with ZodPromise and hoping to add this functionality in a PR. I checked out the CONTRIBUTING.md first and it asked I open an issue. So here I am....
ZodPromise is created with a second Zod type that is checked when the promise resolves. I'd like to be able to access the schema the ZodPromise was created with. For example
I'm not sure there is a way to do this at the moment and I'm open to suggestions on variable naming and such. If this is something that makes sense to PR I can draft something but looking for some feedback first. Thanks.
The text was updated successfully, but these errors were encountered: