Say I have two types in TypeScript:
interface Foo {
bar: string;
}
interface Baz {
foo: Foo;
}
Is there a way in TypeScript to flatten Baz
(e.g. type FlatBaz = Flat<Baz>
), such that the signature looks something like this?
interface FlatBaz {
"foo.bar": string;
}