json-to-dts

2.0.1 • Public • Published

json-dts-generator

Generate TS declaration files from JSON files. Suitable for both small and large datasets.

Usage

Install it globally:

$ npm i -g json-dts-generator
$ json-dts-generator <input_json> <output_dts>

Or use npx:

$ npx json-dts-generator <input_json> <output_dts>

Purpose

Reads the input json file, parses each into a TS declarations and outputs a dts file.

Pitfalls

  • Cannot infer proper types for empty arrays. The script will warn you if it runs into any of these so that you can fix them manually.

Package Sidebar

Install

npm i json-to-dts

Weekly Downloads

0

Version

2.0.1

License

MIT

Unpacked Size

18.9 kB

Total Files

10

Last publish

Collaborators

  • gmags