JSON.strigify() breaks with cyclic objects (as per https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cyclic_object_value )
The same article recommends 'cycle.js' - which adds 2 methods to the global JSON object - .decycle() & .retrocycle() to stringify cyclic objects.
This works great, but typescript complains unless I add
//@ts-ignore
or other ts hacks - JSON [ 'retrocycle' ] (), etc - which I can do but it's not pretty.
Is there anyway to create something like a "JSON.d.ts" file to override the default TS interface for the global JSON object?