【文件属性】:
文件名称:transform-json-types:从JSON生成Flow,TypeScript,Rust Serde Struct和Scala Case类的实用程序
文件大小:65KB
文件格式:ZIP
更新时间:2021-05-06 16:20:26
JavaScript
transform-json-types
从JSON生成Flow,TypeScript,Rust Serde Struct和Scala Case类的实用程序。
注意:它还从集合中检测TS / Flow的可选属性。
安装
npm install transform-json-types
在线REPL可在以下位置获得:
基本用法
import transform from "transform-json-types"
const json = `{
"hello": "world"
}`
console . log ( transform ( json , {
lang : "typescript"
} ) )
// interface RootJson {
// hello: string
// }
console . log ( transform ( json , {
【文件预览】:
transform-json-types-master
----.gitignore(81B)
----.babelrc(25B)
----.all-contributorsrc(1KB)
----.eslintrc(87B)
----package.json(3KB)
----src()
--------index.js(9KB)
----.travis.yml(225B)
----rollup.cjs.js(405B)
----Readme.md(4KB)
----tests()
--------snapshots()
--------index.test.js(2KB)
--------config()
----.eslintignore(0B)
----banner.js(231B)
----.editorconfig(406B)
----yarn.lock(196KB)
----rollup.umd.js(408B)