Skip to content

Support Recursive JSON Type #1858

Closed
Closed
@AlekseiAQ

Description

@AlekseiAQ

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions