You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
671 B
30 lines
671 B
export declare enum ApplyPluginsType {
|
|
compose = "compose",
|
|
modify = "modify",
|
|
event = "event"
|
|
}
|
|
interface IPlugin {
|
|
path?: string;
|
|
apply: object;
|
|
}
|
|
interface IOpts {
|
|
validKeys?: string[];
|
|
}
|
|
export default class Plugin {
|
|
validKeys: string[];
|
|
hooks: {
|
|
[key: string]: any;
|
|
};
|
|
constructor(opts?: IOpts);
|
|
register(plugin: IPlugin): void;
|
|
getHooks(keyWithDot: string): any;
|
|
applyPlugins({ key, type, initialValue, args, async, }: {
|
|
key: string;
|
|
type: ApplyPluginsType;
|
|
initialValue?: any;
|
|
args?: object;
|
|
async?: boolean;
|
|
}): any;
|
|
}
|
|
export {};
|