ardatan/feTS

Circular Reference Error with Array of Recursive Objects

akifunal opened this issue · 2 comments

Describe the bug

I previously opened an issue #1823 related to a "Type of property 'x' circularly references itself" error, which was resolved (thanks for that!). The fix worked well for our initial cases. I’ve now encountered another scenario where the error reappears. This time, it occurs with an array of objects that reference a recursive schema.

To Reproduce Steps to reproduce the behavior:

typescriptlang playground

Expected behavior

I expected this recursive array structure to work without triggering a circular reference error, especially given that a similar issue was previously resolved.

Environment:

  • OS: MacOS Sonoma 14.6.1
  • package-name...: fets@0.8.3
  • NodeJS: 20.14.0
  • TypeScript: 5.5.4

Additional context

This is a similar issue to the one you resolved before, but it involves arrays of recursive objects, which seems to introduce a new layer of complexity.

Hi,

I wanted to follow up on this issue as it’s causing significant problems across six of our React apps. Given its impact, we would greatly appreciate it if you could prioritize a fix.

Thank you for all your work on this amazing library! ❤️