For example:
I want to change this
interface typeA {
name:string;
children?:typeA[];
}
const a:typeA[] = [
{
name: 'b',
children: [
{
name: 'c'
}
]
},
{
name: 'd',
children: [
{
name: 'e',
children: [
{
name: 'f'
}
]
}
]
}
];
To this
type A = 'b' | 'b.c' | 'd' | 'd.e' | 'd.e.f';
So, I want to convert Array Object to String literal, is it possible to do this?