ms/packages/plugin/src/interfaces.ts
MiaoWoo e5bab5763c feat: complate event and command module
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-19 18:59:32 +08:00

36 lines
878 B
TypeScript

import { injectable, postConstruct } from "inversify";
export namespace interfaces {
@injectable()
export abstract class Plugin {
public description: PluginMetadata;
public logger: Console;
public load() { }
public enable() { }
public disable() { }
}
export interface PluginMetadata {
name: string;
version: string;
author: string | string[];
source: string;
target?: any;
}
export interface CommandMetadata {
name?: string;
executor?: string;
paramtypes?: string[];
}
export interface TabCompleterMetadata {
name?: string;
executor?: string;
paramtypes?: string[];
}
export interface ListenerMetadata {
name?: string;
executor?: string;
}
export type PluginLike = Plugin | string;
}