1.3.1 • Published 4 years ago

sg2ts v1.3.1

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

sg2ts

解析 swagger 文档成typescript的interface工具。可以访问这里来使用在线转换页面

用法

安装:

yarn add sg2ts

# or npm
npm install sg2ts

使用:

import sg2ts from 'sg2ts'

const result = sg2ts('workOrders (array[WorkOrderDo], optional): 订单相关的工单列表,', {
    space: 2,
    withInterface: true,
    withExport: true,
})

console.log(result)  // workOrders?: Array<WorkOrderDo> // 订单相关的工单列表,

option

option类型意义默认值
spacenumber每个字段前置4
withInterfaceboolean是否自动带上 interface 关键字true
withExportboolean是否自动带上 export 关键字true
1.3.1

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.3

4 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago