Recursive list
ts_recursive_list.RdFor complex recursive lists. These are objects that can contain subcomponents of the same (parent) type. e.g., Person can have name, dob, properties, and 'children' which is an (optional) array of Person objects.
Details
Defining this type in Zod is currently complicated, as the type has to be pre-defined, and then extended after manually defining the Type. In an upcoming version of zod 4, this should be simplified. For now, it's tricky.
Examples
r_list <- ts_recursive_list(
list(name = ts_character(1)),
list(children = ts_self())
)