Is there any tool or utility available that can accomplish this task?
const foo: Foo = { ... }
const bar: string = JSON.stringify(foo)
const baz: JSON<Foo> = JSON.parse(foo)
JSON<Foo>
would essentially mirror all the properties of Foo
, with the alterations made by JSON.stringify