Skip to content

Support Recursive JSON Type #1858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AlekseiAQ opened this issue Nov 14, 2024 · 1 comment
Closed

Support Recursive JSON Type #1858

AlekseiAQ opened this issue Nov 14, 2024 · 1 comment
Milestone

Comments

@AlekseiAQ
Copy link

Is your feature request related to a problem? Please describe.
Support Recursive JSON Type.

Describe the solution you'd like
Types like this work

type JSONContent {
  type String
  content JSONContent[]?
  text String?
}

Describe alternatives you've considered
n/a

Additional context
Currently this type creates an error:

error TS7022: 'JSONContentSchema' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.

5 export const JSONContentSchema = z.object({
               ~~~~~~~~~~~~~~~~~

: Error compiling generated code
@ymc9
Copy link
Member

ymc9 commented Nov 19, 2024

Fixed in 2.9.0

@ymc9 ymc9 closed this as completed Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants