Open djvs opened 1 year ago
Hi @djvs and thanks for the issue !
Yes, for the moment, FromSchema
doesn't handle recursive schemas. There's no simple way to fix your issue sadly.
I'm honestly not sure this is achievable, but I'll look into it. Possible solutions are:
interfaces
)FromSchema
automatically detects circular references and type them as any
FromSchema
enables deactivating references, and you can use the deserialize
option to resolve them (as any
as well)
Taking this file as an example:
I'm seeing this:
Type of property 'fields' circularly references itself in mapped type '{ id: { type: "primitive"; value: string; isSerialized: false; deserialized: never; }; key: { type: "primitive"; value: string; isSerialized: false; deserialized: never; }; type: { type: "const"; value: "object"; isSerialized: false; deserialized: never; }; name: { ...; }; fields: _$Array<...>; }'. (tsserver 2615)
This was working prior to an update from 1.6 to latest (2.5.5). Recommendation on how to resolve?