Extensions inspire

Type Api

5

Details

Author:
yejunqin1992

Category:
Developer Tools

Version:
0.0.7

Users:
21

Rating:
5

Size:
423KiB

Price:
Free

Updated:
June 15, 2021

Webstore Link:
https://chrome.google.com/webstore/detail/type-api/mccijcgccbfbkjjlibjopocgieocnmpc

Download

version 0.0.7  - Download ZIP file

version 0.0.6  - Download ZIP file

version 0.0.5  - Download ZIP file

Description

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

Top Extensions

 
(10943)
 
(50577)
 
(98995)
 
(25231)
 
(8324)
 
(1434)
 
(11367)

What has inspired us?

Extore is a team of professionals who are passionate about creating extensions for web browsers. This devotion also gives us opportunity to appreciate work of other people. We get inspired by useful, open source extensions made by developers all over the world. Our strong belief is that one should share helpful add-ons with others. That’s why we’d like to present you our ever-growing list of favourite extensions that have inspired us. Moreover, as you probably have already learned, sometimes struggling for the best brings an end to the good. Talking about add-ons it often turns out that an upgrade is worse then previous version. Also it can become really tricky to get back to the beloved version of your favourite extension. That’s why we’re going to make not only the latest, but all versions of our favourite (and we hope yours too) add-ons available for download. No more compromises, just stick to the version you really like!