As I am trying to automate my Development process, I would like to create a Ts/Angular Interface based on a JSON response.
Let‘s say that I am getting a response which looks like this
{"name":"John", "age":30, "car":“Honda“}
The Final outcome should Look like this
export interface User {
name: String,
age: Number,
car: string
}
A little more background: As I have to implement a lot of list components i would like to generate a schematic which creates a generic List component where i can pass any data and display it. Therefore i would like to create a custom interface as well
I have searched the internet with a lot of different search queries but could Not find an accurate solution therefore if somebody could give me a hint if there is an api, code example or whatever I would be really grateful