json-tell
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

json-tell Build Status install size

Generates TypeScript interfaces from a JSON object

  • Node 10+
  • Zero Dependencies

Installation

npm install json-tell
yarn add json-tell

Usage

import {getTypes} from 'json-tell';

const options = {
  exported: false,
  root: 'RootObject'
};

const json = getJsonFromSomewhere();
console.log(getTypes(json, options));

Options

  • exported: If true, will add export to all interfaces
  • root: Specify the name of the root object interface (defaults to 'RootObject')

Readme

Keywords

none

Package Sidebar

Install

npm i json-tell

Weekly Downloads

6

Version

0.1.2

License

MIT

Unpacked Size

21.2 kB

Total Files

15

Last publish

Collaborators

  • kylerector