Convert to much simpler model

This commit is contained in:
Daniel Imms
2019-04-07 14:53:09 -04:00
parent 49f58f5d25
commit 26a80d0d35
10 changed files with 49 additions and 140 deletions
+7 -11
View File
@@ -772,22 +772,18 @@ declare module 'xterm' {
*/
static applyAddon(addon: any): void;
loadAddon<T extends ITerminalAddon>(addonConstructor: ITerminalAddonConstructor<T>): T;
disposeAddon<T extends ITerminalAddon>(addonConstructor: ITerminalAddonConstructor<T>): void;
getAddon<T extends ITerminalAddon>(addonConstructor: ITerminalAddonConstructor<T>): T;
}
export interface ITerminalAddonConstructor<T extends ITerminalAddon> {
new(terminal: Terminal): T;
/**
* Loads an addon into this instance of xterm.js.
* @param addon The addon to load.
*/
loadAddon(addon: ITerminalAddon): void;
}
export interface ITerminalAddon {
/**
* This property declares all addon dependencies that must be intialized
* before this addon can be constructed. For addons with no dependencies
* just don't include this property.
* This is called when the addon is activated within xterm.js.
*/
// readonly DEPENDENCIES?: ITerminalAddonConstructor<ITerminalAddon>[];
activate(terminal: Terminal): void;
/**
* This function includes anything that needs to happen to clean up when