0.1.2 • Published 4 years ago
json-tell v0.1.2
json-tell

Generates TypeScript interfaces from a JSON object
- Node 10+
- Zero Dependencies
Installation
npm install json-tellyarn add json-tellUsage
import {getTypes} from 'json-tell';
const options = {
exported: false,
root: 'RootObject'
};
const json = getJsonFromSomewhere();
console.log(getTypes(json, options));Options
exported: If true, will addexportto all interfacesroot: Specify the name of the root object interface (defaults to'RootObject')