0
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 to create the B interface dynamically, based on the var_A object? Is it possible?
A dynamic interface? Why do you need to do this?
– Woss
To see if you can do.
– Brunno Vianna