feTS icon indicating copy to clipboard operation
feTS copied to clipboard

Circular Reference Error with Array of Recursive Objects

Open akifunal opened this issue 6 months ago • 1 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...: [email protected]
  • 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.

akifunal avatar Aug 16 '24 08:08 akifunal