TypeScript接口文档生成工具

Latest Version

Version
0.0.7
Update
June 16, 2021
Size
423KiB
Developer
Category
Users
19
Rating
3.5 ★
Manifest Version
2
Web Store Status
Languages Support
中文 (简体)
See more
Permissions
Storage
See more

Type Api Extension

Type Api是一个TypeScript接口文档生成器, 可以生成有类型声明的文档到你的剪贴板。

#### Pagination类使用泛型
为了减少无用的声明, 分页的接口不再声明`Pagination`类, 因此项目需要声明一个全局`Pagination`类, 接受泛型参数.
在项目的全局声明文件, 如`global.d.ts`加上如下声明:
```ts
// type-declarations/global.d.ts
type Pagination = {
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 = {
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
Read more

Source Manifest.json

{"update_url": "https://clients2.google.com/service/update2/crx", "name": "Type Api", "version": "0.0.7", "description": "TypeScript\u63a5\u53e3\u6587\u6863\u751f\u6210\u5de5\u5177", "browser_action": { "default_title": "Type Api", "default_icon": "images/logo_01.png" }, "icons": { "48": "images/logo_01.png" }, "content_scripts": [ { "js": ["jquery-3.4.1.min.js", "toastr.min.js", "main.js"], "css": ["main.css", "toastr.min.css"], "matches": ["http://doc.shoff.ke.com/*/*"], "run_at": "document_start" } ], "background": { "scripts": ["background.js"], "persistent": false }, "options_page": "options.html", "permissions": ["storage"], "manifest_version": 2, "content_security_policy": "script-src 'self' https://ajax.googleapis.com; object-src 'self'"}
Read more

Similar Extensions

icon

Page Edit Extension · Developer Tools 19 31 ★ 229KiB

icon

OpenOffice Writer online for Word documents Extension · Productivity 19 98 ★ 410KiB

icon

SERP Preview Tool Extension · Developer Tools 19 32 ★ 87.63KiB

icon

GrowthBook DevTools Extension · Developer Tools 19 5 ★ 694KiB

icon

Offline QR Code Generator/Editor Extension · Productivity 19 17 ★ 60.11KiB

icon

JSON Beautifier and Editor Extension · Productivity 19 36 ★ 450KiB

icon

LaTeX Table Generator Extension · Developer Tools 19 4 ★ 1.56MiB

icon

DeploySentinel Recorder Extension · Developer Tools 19 13 ★ 686KiB

icon

Initab Extension · Developer Tools 19 95 ★ 12.93MiB

icon

Script Hub 发现网页可用脚本插件|油猴脚本Plus Extension · Productivity 19 4 ★ 162KiB

icon

阿里机器人 Extension · Productivity 19 0 ★ 2.83MiB

icon

ScriptRunner - v3 userScript manager Extension · Productivity 19 3 ★ 154KiB

icon

Apifox Browser Extension Extension · Developer Tools 19 9 ★ 28.39KiB

icon

Cool Papers Redirector Extension · Productivity 19 3 ★ 27.52KiB

icon

CSS Selector Capture Pro Extension · Developer Tools 19 11 ★ 116KiB

icon

Document Editor for doc & docx Extension · Productivity 19 207 ★ 415KiB

icon

DocsWork Editor for documents DOC & DOCX Extension · Productivity 19 33 ★ 321KiB

icon

幕布导出器 - Mubu Dumper Extension · Productivity 19 6 ★ 207KiB

icon

htmx-debugger Extension · Developer Tools 19 1 ★ 71.28KiB

icon

ConstEdit Word Processor Extension · Productivity 19 3 ★ 3.2MiB

icon

Axure Location Extension · Productivity 19 0 ★ 14.07KiB

icon

Nota AI Tools Extension · Productivity 19 0 ★ 831KiB

icon

Notatnik Extension · Productivity 19 1 ★ 193KiB

icon

Page Modeller (Selenium, Robot Framework etc) Extension · Developer Tools 19 5 ★ 1.12MiB

User reviews

icon

chunjian liang (ID: 000000af00790fcc) Voted 2 ★ - Updated 10/12/2021 使用教程怎么没有?装了之后不知道咋用呀 ???

icon

Qiang Wei (ID: 0000005c45cedb6d) Voted 5 ★ - Updated 08/04/2020 真香