transform json to typescript interface
npm install json2tstool> 转换JSON字符串为TypeScript Interface字符串
``
npm i json2tstool
`
`javascript
const jsonStr = { "key" : 2 };
json2tstool.default(jsonStr);
`
`javascript
import json2ts from 'json2tstool';
const jsonStr = { "key" : 2 };
json2ts(jsonStr);
`
`javascript
const json2ts = require('json2tstool');
const jsonStr = { "key" : 2 };
json2ts(jsonStr);
`
`bash
``
如果该库对你有帮助,可以点一下 ⭐️!