Overview
Plugin Interface
The plugin class should implement this interface. The methods are used to subscribe to events. Events available are listed here.
Example
Instantiate a plugin.
import { Plugin } from "@qatium/sdk/plugin";
class MyPlugin implements Plugin { run() {}};
const myPlugin = new MyPlugin();
init()
The function init
is the entry point for the plugin code. It should be called with the plugin instance in order to run the plugin.
Method signature
init(plugin: Plugin): void;
Parameters
plugin: Plugin
: A Plugin instance
Example
Initializes a plugin instance.
import { Plugin, init } from "@qatium/sdk/plugin";
class MyPlugin implements Plugin { run() {}};
const myPlugin = new MyPlugin();
init(myPlugin);