rails icon indicating copy to clipboard operation
rails copied to clipboard

Allow an Input type param to be passed to Generate

Open imownbey opened this issue 1 year ago • 4 comments

Zod has a concept of z.input<> which makes default things optional. It is often equal to z.infer<> but nice to use when it is not.

This adds a second type param Input which is equal to Output (previously T) by default.

The fact that parse is typed with Output reads a little weird but I think correct because it uses that type as the return type, and z.input<typeof x> will return z.infer<typeof x>.

imownbey avatar Jun 20 '24 15:06 imownbey