extension ExtPose

Type Api (delisted)

CRX id

mccijcgccbfbkjjlibjopocgieocnmpc-

Description from extension meta

TypeScript接口文档生成工具

Image from store Type Api
Description from store Type Api是一个TypeScript接口文档生成器, 可以生成有类型声明的文档到你的剪贴板。 #### Pagination类使用泛型 为了减少无用的声明, 分页的接口不再声明`Pagination`类, 因此项目需要声明一个全局`Pagination`类, 接受泛型参数. 在项目的全局声明文件, 如`global.d.ts`加上如下声明: ```ts // type-declarations/global.d.ts type Pagination<T> = { pageList: T[]; // 实体对象列表 pageSize: number; // 每页返回多少条数据 pageNo: number; // 当前页码,从1开始 totalCount: number; // 总记录数 totalPage: number; // 总页数 nextPage: number; // 下一页页码 prePage: number; // 上一页页码 lastPage: boolean; // 是否最后一页 firstPage: boolean; // 是否第一页 }; ``` ##### PageInfo分页类 财务后端分页使用的是PageInfo类, 同样的在全局声明文件加上: ```ts // type-declarations/global.d.ts type PageInfo<T> = { pageNum: number; pageSize: number; size: number; startRow: number; endRow: number; pages: number; prePage: number; nextPage: number; isFirstPage: boolean; isLastPage: boolean; hasPreviousPage: boolean; hasNextPage: boolean; navigatePages: number; navigatepageNums: number; navigateFirstPage: number; navigateLastPage: number; total: number; list: T[]; } ``` 更多:https://git.lianjia.com/sh-fe/ts-declare-generator/-/blob/master/README.md

Latest reviews

  • (2021-10-12) chunjian liang: 使用教程怎么没有?装了之后不知道咋用呀 ???
  • (2020-08-04) Qiang Wei: 真香

Statistics

Installs
19 history
Category
Rating
3.5 (2 votes)
Last update / version
2021-06-17 / 0.0.7
Listing languages

Links