+
Skip to content

krtools/json-tell

Repository files navigation

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')

About

Generates TypeScript interfaces from a JSON object

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载