Add info types for ZeppelinPluginBlueprint

This commit is contained in:
Dragory 2020-07-22 23:11:42 +03:00
parent cc320728f0
commit a3d0ec03d9
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
2 changed files with 9 additions and 1 deletions

View file

@ -1,11 +1,19 @@
import { BasePluginType, plugin, PluginBlueprint } from "knub";
import * as t from "io-ts";
import { getPluginConfigPreprocessor } from "../pluginUtils";
import { TMarkdown } from "../types";
export interface ZeppelinPluginBlueprint<TPluginType extends BasePluginType = BasePluginType>
extends PluginBlueprint<TPluginType> {
configSchema?: t.TypeC<any>;
showInDocs?: boolean;
info?: {
prettyName: string;
description?: TMarkdown;
usageGuide?: TMarkdown;
configurationGuide?: TMarkdown;
};
}
export function zeppelinPlugin<TPartialBlueprint extends Omit<ZeppelinPluginBlueprint, "name">>(

View file

@ -15,7 +15,7 @@ export type TZeppelinKnub = Knub<IZeppelinGuildConfig, IZeppelinGlobalConfig>;
/**
* Wrapper for the string type that indicates the text will be parsed as Markdown later
*/
type TMarkdown = string;
export type TMarkdown = string;
export interface ZeppelinPluginInfo {
prettyName: string;