ms/packages/plugin/src/interfaces.ts

56 lines
1.2 KiB
TypeScript
Raw Normal View History

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;
/**
*
*/
prefix?: string;
/**
*
*/
version: string;
/**
*
*/
author: string | string[];
/**
* __filename
*/
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;
servertype?: string;
}
export type PluginLike = Plugin | string;
}