When dealing with cyclic objects, JSON.stringify() can break (as mentioned in https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cyclic_object_value)
An alternative solution suggested in the same article is to use 'cycle.js', which introduces two additional methods to the global JSON object - .decycle() & .retrocycle() for handling cyclic objects during stringification.
While this method works well, TypeScript might throw errors unless specific workarounds like //@ts-ignore or using JSON['retrocycle']() are implemented, although they may not be aesthetically pleasing.
Is there a way to create a custom "JSON.d.ts" file to override the default TypeScript interface for the global JSON object?