Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 871 Bytes

README.md

File metadata and controls

52 lines (34 loc) · 871 Bytes

json-to-ts-typing

json数据转换成ts类型

使用编译原理,解析Json,输出 TS 类型

json-parse > transform > codegen

在线链接

Features

  • 支持层级嵌套
  • 支持数组解析
  • 支持行内和换行的注释解析
  • 支持key值无引号模式

Getting started

  1. Create the project.

    git clone https://github.com/frontend-winter/json-to-ts-typing/
  2. Access the project directory.

    cd json-to-ts-typing/
  3. Initialize a git repository.

    git init
  4. Install dependencies.

    pnpm install
  5. Start dev server with hot reload at http://localhost:5793.

    pnpm run dev

掘金

https://juejin.cn/post/7189872467710574653