Z
Zod13mo ago
Whimsy

Cyau - hey, how can we get some z.object schema...

hey, how can we get some z.object schema inside of already made z.object schema, ei:
const schema = z.object({
test: z.object({
hi: z.number(),
}),
});

// (imaginary) -> schema.test.parse(); -> { hi: number; }
const schema = z.object({
test: z.object({
hi: z.number(),
}),
});

// (imaginary) -> schema.test.parse(); -> { hi: number; }
2 Replies
janglad
janglad13mo ago
I think you might be looking for .shape?
Whimsy
WhimsyOP13mo ago
seems so
Want results from more Discord servers?
Add your server