优化
This commit is contained in:
63
client/web/types/global.d.ts
vendored
Normal file
63
client/web/types/global.d.ts
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* Copy from `tailchat/client/shared/model/plugin.ts`
|
||||
*/
|
||||
interface PluginManifest {
|
||||
/**
|
||||
* 插件用于显示的名称
|
||||
* @example 网页面板插件
|
||||
*/
|
||||
label: string;
|
||||
|
||||
/**
|
||||
* 插件名, 插件唯一标识
|
||||
* @example com.msgbyte.webview
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* 插件地址
|
||||
*/
|
||||
url: string;
|
||||
|
||||
/**
|
||||
* 插件图标
|
||||
* 推荐大小: 128x128
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
/**
|
||||
* 插件版本号
|
||||
* 遵循 semver 规则
|
||||
*
|
||||
* major.minor.patch
|
||||
* @example 1.0.0
|
||||
*/
|
||||
version: string;
|
||||
|
||||
/**
|
||||
* 插件维护者
|
||||
*/
|
||||
author: string;
|
||||
|
||||
/**
|
||||
* 插件描述
|
||||
*/
|
||||
description: string;
|
||||
|
||||
/**
|
||||
* 是否需要重启才能应用插件
|
||||
*/
|
||||
requireRestart: boolean;
|
||||
|
||||
/**
|
||||
* 文档的链接
|
||||
* 如果是markdown则解析, 如果是html则使用iframe
|
||||
*/
|
||||
documentUrl?: string;
|
||||
}
|
||||
|
||||
declare interface Window {
|
||||
tailchat?: {
|
||||
installPlugin?: (manifest: PluginManifest) => Promise<void>;
|
||||
};
|
||||
}
|
||||
5
client/web/types/index.d.ts
vendored
Normal file
5
client/web/types/index.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
declare module '*.jpg';
|
||||
declare module '*.svg';
|
||||
declare module '*.png';
|
||||
declare module '*.module.less';
|
||||
declare module '@bbob/parser'; // Work around for com.msgbyte.bbcode. ts-jest looks like cannot load plugins-self typedefinition
|
||||
Reference in New Issue
Block a user