@housecor Tests without types means a bunch of my tests *are about* types. I chose types in poll, but maybe tests are the right answer π€ then again, imagine the sheer quantity of tests youβd need
@CLAYster404 @mattpocockuk Sorry - to be clear, I am suggesting the opposite in this code ^. Youβre actually creating the types *from* the schema! Which is really really cool - I think it is where Zod shines most! Youβre outputting strictly typed data structures with generated types
@CLAYster404 @mattpocockuk Yes there is! I do this a lot:
type ValidTableSchema = z.infer<typeof tableConfigSchema>
// type youβd use
type = ZodType.SafeParseReturnType<ValidTableSchema, ValidTableSchema>