I'm trying to accomplish the following:
interface A {
name: string,
type: string
}
let var_A: Array<A> = [
{name: 'firstName', type: 'string'},
{name: 'lastName', type: 'string'},
{name: 'age', type: 'number'}
]
interface B {
firstName: string,
lastname: string,
age: number
}
let var_B: Array<B> = [
{firstName: 'José', lastname: 'Silva', age: 25},
{firstName: 'Pedro', lastname: 'Paulo', age: 50},
]
My big problem is: how can I create the B interface dynamically, based on the var_A object? Is it possible?