使用编译原理
,解析Json,输出 TS 类型
json-parse > transform > codegen
- 支持层级嵌套
- 支持数组解析
- 支持行内和换行的注释解析
- 支持key值无引号模式
-
Create the project.
git clone https://github.com/frontend-winter/json-to-ts-typing/
-
Access the project directory.
cd json-to-ts-typing/
-
Initialize a git repository.
git init
-
Install dependencies.
pnpm install
-
Start dev server with hot reload at http://localhost:5793.
pnpm run dev