Plugin
This is an interface for extending the capabilities of WineHorn.
ts
import Plugin from "winehorn/Plugin";
ts
default interface Plugin<T> {
name: string;
id: string;
install(wh: WineHorn): T;
}
name
- public name of the plugin.id
- the name under which the plugin will be registered in theWineHorn.$
registry.install(wh: WineHorn): T
- a function that returns an object (i.e.<T>
) that will be written to the registerWineHorn.$
.
To install the plugin, use the method WineHorn.use<T>(plugin: Plugin<T>): void