Share types between client and server
问题 I'm working on a project with a Node.js, Express.js & TypeScript backend (REST API) and a React, Redux & TypeScript frontend. In the backend I have created some types for example: models/Product.ts export type Product = { title: string description: string price: number } So the REST API is sending a response like the following: { "data": [ {"title": "Shoe", "Description": "This is a shoe.", "price": 20}, {...} ] // inside here all the Products[] } On the client I want to cast the data to the