You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeBox does not support cyclic types. The issue here is that these type functions are cyclically initializing each other. You can reproduce the issue by calling the userFindMany() function only.
You can somewhat approach cyclic types using Type.Ref however cyclic type inference is not well supported in TypeBox (due to difficulties getting TypeScript to handle infinite instantiations). Additionally, cyclic, self referential values are non-serializable in JSON.
The recommendation for handling these types would be use either use Type.Ref or just explicitly implement a custom type and register via the TypeRegistry. Another approach may be to use a generic recursive type, but would likely require refactoring (or restructuring the type to support)
Will close off this issue as this functionality is currently not supported.
All the best
S
The text was updated successfully, but these errors were encountered: