npm.io
1.0.1 • Published 5 years agoCLI

@bastou/jsontotsinterface

Licence
ISC
Version
1.0.1
Deps
41
Size
174 kB
Vulns
0
Weekly
0

Json to typescript interface generator

Get json from url and export it to a typescript interface file with specified root name.

How to use

  • -n : (Optional) Interface name (default: RootObject)
  • -i : Input url or path to json
  • -o : Output path for generated Typescript interface file

Example :

node index.js -n=redditPopular -i=https://www.reddit.com/r/popular.json -o=./types/redditPopularInterface.ts  

Credits

@mariusalsh

Keywords