Z
Zod2mo ago
Leozinn

Leozinn - i'm compiled my project, and interfac...

i'm compiled my project, and interfaces.d.ts return this... How am I going to use typing in my project, if it is like a zod object?
No description
3 Replies
Scott Trinh
Scott Trinh2mo ago
What's the actual question here? Your project will need to depend on zod because you're using zod, so this will work. Or maybe you want to export just the types? (just the types will still depend on Zod)
Leozinn
LeozinnOP2mo ago
Yeah, I just wanted to use the types, but I think that was my mistake. Why not do a z.infer and export the types directly...
Scott Trinh
Scott Trinh2mo ago
Yeah (btw, I'd use z.output instead of z.infer just to make sure you get the output type which will capture any transformations, defaults, etc)

Did you find this page helpful?