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

17 lines
647 B
TypeScript
Raw Normal View History

import { BasePluginType, PluginClass, PluginOptions } from "knub";
import * as t from "io-ts";
import { TZeppelinKnub, ZeppelinPluginInfo } from "../types";
import { pluginConfigPreprocessor } from "../pluginUtils";
2019-10-13 00:21:35 +03:00
2020-06-30 17:48:18 +03:00
export class ZeppelinPluginClass<TPluginType extends BasePluginType = BasePluginType> extends PluginClass<TPluginType> {
public static pluginInfo: ZeppelinPluginInfo;
2019-08-22 01:22:26 +03:00
public static showInDocs: boolean = true;
2019-08-22 02:58:32 +03:00
public static configSchema: t.TypeC<any>;
protected readonly knub: TZeppelinKnub;
public static configPreprocessor(options: PluginOptions<any>) {
return pluginConfigPreprocessor.bind(this)(options);
2019-10-13 00:21:35 +03:00
}
}