【文件属性】:
文件名称:typeof-jsonc:将jsoncjson转换为Typescript接口
文件大小:79KB
文件格式:ZIP
更新时间:2021-05-02 16:12:26
TypeScript
typeof-jsonc
typeof-jsonc是用于将json或jsonc字符串转换为typescript类型(接口)的库
支持
基本类型
数组类型(支持自动合并)
相同的结构自动合并
注释
JsDoc评论
自定义命名
杰森
杰森克
不是标准的jsonc或json
用法
安装
npm install typeof-jsonc -S
或者
yarn add typeof-jsonc -S
演示版
Jsonc string
{
"barr" : [
// aaa
"aaa" ,
"bbb"
] ,
"name" : "lanfeng" , // this is name
// this is demo
"demo" : {
"hello" : "world"
} ,
/** this is arr */
"arr" :
【文件预览】:
typeof-jsonc-master
----.gitignore(65B)
----package.json(2KB)
----tslint.json(946B)
----.npmrc(37B)
----package-lock.json(280KB)
----src()
--------render()
--------types()
--------utils()
--------parser()
--------index.ts(504B)
----jest.config.js(95B)
----LICENSE(1KB)
----tsconfig.json(5KB)
----tsconfig.tsnode.json(83B)
----types()
--------mapSet.d.ts(123B)
--------helper.d.ts(704B)
--------render()
--------types.d.ts(667B)
--------utils()
--------mergeDec.d.ts(423B)
--------parser()
--------singleName.d.ts(125B)
--------commentsParser.d.ts(522B)
--------jsoncParser.d.ts(194B)
--------arrayType.d.ts(359B)
--------format.d.ts(58B)
--------index.d.ts(394B)
----rollup.config.js(3KB)
----.release-it.json(227B)
----README.md(4KB)
----demo()
--------index.ts(401B)
--------test(1KB)
----tests()
--------commentParser.test.ts(1KB)
----.eslintignore(4B)
----.vscode()
--------settings.json(296B)
--------launch.json(497B)
----.npmignore(120B)
----.prettierrc(141B)