TypeScript接口文档生成工具.
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
You can Follow the below Step By Step procedure to install the Type Api Chrome Extension to your Chrome Web browser.
It is the Type Api Chrome extension download link you can download and install Chrome Browser.
Tags: Pageinfo , Pagination , Ts Declare Generator Blob , Type Pageinfo , Pagination , Typescript , Pagelist , Ts , Type Pagination , , Type Api Typescript , ,
Automatically Type On typing.com and nitrotype.com
This extension allows you to automatically type in Russian
As you type DuckDuckgo and uses I'm feeling lucky to go to first result
Enjoy this game Type Fast Words, play this game right your Chrome. Have fun!
The easiest way to type emoji on your keyboard, just type and press enter to copy ?⌨️??
An extension that lets you test your words per minute (WPM), right in your browser!
Navigate websites without using your mouse.
Test your writing speed!
Enables Vietnamese number key based
Type Upside Down on Google Chrome!