Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

gents

vutran3MIT0.1.3TypeScript support: included

Generate TypeScript definitions from JSON

readme

gents

Generate TypeScript definitions from JSON.

Install

$ npm i -D gents

Usage

import gents from 'gents';

const json = `{ "user_id": 1 }`;

const def = gents(json, User);
// interface User {
//     user_id: number;
// }