Overview
Plugin Interface
Section titled “Plugin Interface”The plugin class should implement this interface. The methods are used to subscribe to events. Events available are listed here.
Example
Section titled “Example”Instantiate a plugin.
import { Plugin } from "@qatium/sdk/plugin";
class MyPlugin implements Plugin { run() {}};
const myPlugin = new MyPlugin();
init()
Section titled “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
Section titled “Method signature”init(plugin: Plugin): void;
Parameters
Section titled “Parameters”plugin: Plugin
: A Plugin instance
Example
Section titled “Example”Initializes a plugin instance.
import { Plugin, init } from "@qatium/sdk/plugin";
class MyPlugin implements Plugin { run() {}};
const myPlugin = new MyPlugin();
init(myPlugin);