shadi - hey everyone, i've been struggling with...
hey everyone, i've been struggling with building a recursive zod schema. I tried following the docs: https://github.com/colinhacks/zod?tab=readme-ov-file#recursive-types but still can't figure it out for my use case. here is what I'm trying to achieve:
thanks in advance 🙏
Solution:Jump to solution
You have to manually type either direction of the types, for example:
```ts
const ActionSchema = z.object({ ... });
const BranchPromptSchema = z.object({ ... });...
2 Replies