3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-18 23:09:59 +00:00
zeppelin/backend/src/plugins/ZeppelinPluginClass.ts

16 lines
647 B
TypeScript

import { BasePluginType, PluginClass, PluginOptions } from "knub";
import * as t from "io-ts";
import { TZeppelinKnub, ZeppelinPluginInfo } from "../types";
import { pluginConfigPreprocessor } from "../pluginUtils";
export class ZeppelinPluginClass<TPluginType extends BasePluginType = BasePluginType> extends PluginClass<TPluginType> {
public static pluginInfo: ZeppelinPluginInfo;
public static showInDocs: boolean = true;
public static configSchema: t.TypeC<any>;
protected readonly knub: TZeppelinKnub;
public static configPreprocessor(options: PluginOptions<any>) {
return pluginConfigPreprocessor.bind(this)(options);
}
}