How to handle circular references in TypeScript when serializing objects to include `$ref` annotations
I have an object structure where circular references need to be represented using $ref
annotations in the output.
Here is an example of the input and expected output :-