TypeScript接口文档生成工具
Type Api Extension
#### 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
Source Manifest.json
How to download and manually install Type Api extension for Chrome
Looking for a way to install Type Api extensions for Chrome, you can search for them in the Chrome Web Store, clicking the "Add to Chrome" button, and following the straightforward process.
However, you may need to install Type Api extensions manually, this article outlines two simple methods to effortlessly install Type Api extensions, whether they come as unpacked folders in compressed formats like .zip or as .crx files.
Method 1: Download Type Api extension and manually install through Drag &Drop
If you ever need to manually install a Type Api extension for Chrome, don't worry, it's a simple process. Just follow these easy steps, and you will have your extension ready to use in no time.
Step 1: Download the Type Api Extension by clicking the "Download CRX" button on the website.
Look for the Type Api extension you wish to install. Go to the website and download the Type Api extension package, which is usually a .CRX file and comes in a zipped file. Here ".crx" file is the format for Type Api extension that contains all the data.
Step 2: Extract &Arrange Files
Once the file is downloaded, extract that file into its own folder. Similarly, give that extension files a permanent home. In other words, keep it in a folder that you don't accidentally delete it because these files will be needed to make that extension work.
Step 3: Go to the Chrome Extensions Page
Open Google Chrome and in the address bar, type chrome://extensions; it will open the Google Chrome extensions page. Make sure that "My extensions" is selected in the sidebar.
Step 4: Drag and Drop the Extension
Now, go to the folder where you extracted the Type Api extension and drag &drop the extension file from there anywhere onto the extension page within Google Chrome.
Step 5: Complete the Installation
Once you drag and drop the extension file, follow the steps that Google Chrome takes you through. Similarly, if the extension file is of .crx file format, you will be required to review the permissions and then add the extension.
Now, you can manage that added extension as you would like to with any other Chrome extension that you added through Chrome Webstore. Its icon will also appear in the Google Chrome Menu on the right side of the address bar once you activate it.
Method 2: Download Type Api extension for Chrome and install in Developer Mode
This is another method to install Type Api extension manually, but the twist is that here, you install by enabling the developer mode option provided in Google Chrome. This mode is commonly used for testing extensions or running unpublished tools.
Step 1: Download the Type Api extension file
Select and download the Type Api extension by clicking the 'Download CRX' button on the website.
Step 2: Extract the downloaded contents
Convert the file to a ZIP file if it is in CRX format then extract the Type Api extension zip file or folder that you downloaded. Make sure you extract it using the same folder name and keep it safely in another folder, so you don't delete it by mistake. The extracted folder will be needed to keep your Type Api extension running.
Step 3: Open Chrome Extension Setting Page
In the address bar of Google Chrome, type chrome://extensions and open the Chrome Extension Page.
Step 4: Enable Developer Mode
After opening the Chrome Extension page, look at the top right side, and you will find the toggle option of "Developer mode."Simply enable that developer mode option.
Step 5: Load the Unpacked Extension
Once you enable the developer mode option, you will see the menu of Load Unpacked, Pack Extensions and Update. From that, select the option "Load unpacked."
Step 6: Select the Extension Folder
Once the pop-up opens upon clicking Load unpacked, select the Type Api extension directory and click on the "Select Folder "button.
Step 7: Confirm and Install
After you select an extension folder of a Google Chrome extension you're installing manually, confirm its installation for the final time and let the installation complete.
Conclusion
Here we've made a step-by-step guide on How to manually install Type Api extension in 2 ways. We hope this guide proves helpful.
Similar Extensions
Page Edit 19 31 ★ 229KiB
OpenOffice Writer online for Word documents 19 98 ★ 410KiB
SERP Preview Tool 19 32 ★ 87.63KiB
GrowthBook DevTools 19 5 ★ 694KiB
Offline QR Code Generator/Editor 19 17 ★ 60.11KiB
JSON Beautifier and Editor 19 36 ★ 450KiB
LaTeX Table Generator 19 4 ★ 1.56MiB
DeploySentinel Recorder 19 13 ★ 686KiB
Initab 19 95 ★ 12.93MiB
Script Hub 发现网页可用脚本插件|油猴脚本Plus 19 4 ★ 162KiB
阿里机器人 19 0 ★ 2.83MiB
ScriptRunner - v3 userScript manager 19 3 ★ 154KiB
Apifox Browser Extension 19 9 ★ 28.39KiB
Cool Papers Redirector 19 3 ★ 27.52KiB
CSS Selector Capture Pro 19 11 ★ 116KiB
Document Editor for doc & docx 19 207 ★ 415KiB
DocsWork Editor for documents DOC & DOCX 19 33 ★ 321KiB
幕布导出器 - Mubu Dumper 19 6 ★ 207KiB
htmx-debugger 19 1 ★ 71.28KiB
ConstEdit Word Processor 19 3 ★ 3.2MiB
Axure Location 19 0 ★ 14.07KiB
Nota AI Tools 19 0 ★ 831KiB
Notatnik 19 1 ★ 193KiB
Page Modeller (Selenium, Robot Framework etc) 19 5 ★ 1.12MiB
User reviews
chunjian liang (ID: 000000af00790fcc) Voted 2 ★ - Updated 10/12/2021
Qiang Wei (ID: 0000005c45cedb6d) Voted 5 ★ - Updated 08/04/2020