Skip to content

Circular Reference Error with Array of Recursive Objects #1827

@akifunal

Description

@akifunal

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions