How to define the data type of the front-end based on the data from the back-end api?
Now I am writing a project in React + TypeScript. I want to declare the data types by interface or type based on the data from the backend api. Are there any automate way to do this work? Or I just have to declare these types by myself?