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

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

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 真香