This is a simple CLI tool that helps to convert JSON data to typescript interfaces. It can take the JSON data from terminal input or from a file and then output the converted typescript interfaces to a file or to the terminal.
To install the package, use the following command:
npm install @theewave/json-to-ts-cli
To use the package in your project, enter this command in your terminal:
npx jtsc
This will spin up a command-line wizard that will take you through the simple conversion process.
-
This is an example of what the process looks like when you output the result to the terminal
-
This is an example of what the process looks like when you output the result to a file
Marius Alch for the great json-to-ts module.