@compass-framework/plugin 1.2.8 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/@types/BasePlugin.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {PluginRuntime} from "./PluginRuntime";
|
|
2
2
|
import {PluginIdentifier} from "./PluginIdentifier";
|
|
3
3
|
|
|
4
|
-
export declare abstract class BasePlugin<
|
|
4
|
+
export declare abstract class BasePlugin<Arguments = {}> {
|
|
5
5
|
public abstract onCreated(args: Arguments): Promise<PluginIdentifier>;
|
|
6
6
|
|
|
7
|
-
public abstract onMounted(runtime: PluginRuntime
|
|
7
|
+
public abstract onMounted(runtime: PluginRuntime): Promise<void>;
|
|
8
8
|
|
|
9
9
|
public abstract onRemoved(): void;
|
|
10
10
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {BasePlugin} from "./BasePlugin";
|
|
2
2
|
|
|
3
|
-
export declare abstract class BasePluginManager<
|
|
4
|
-
protected constructor(
|
|
3
|
+
export declare abstract class BasePluginManager<Arguments = {}> {
|
|
4
|
+
protected constructor();
|
|
5
5
|
|
|
6
|
-
public abstract
|
|
6
|
+
public abstract getArguments(): Arguments;
|
|
7
7
|
|
|
8
|
-
public installPlugin(plugin: BasePlugin<
|
|
8
|
+
public installPlugin(plugin: BasePlugin<Arguments>): Promise<void>;
|
|
9
9
|
|
|
10
|
-
public unInstallPlugin(plugin: BasePlugin<
|
|
10
|
+
public unInstallPlugin(plugin: BasePlugin<Arguments>): void;
|
|
11
11
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import {PluginIdentifier} from "./PluginIdentifier";
|
|
2
2
|
import {PluginPlatform} from "./PluginPlatform";
|
|
3
3
|
|
|
4
|
-
export interface PluginRuntime
|
|
4
|
+
export interface PluginRuntime {
|
|
5
5
|
exportAPIs(apis: object): void;
|
|
6
6
|
|
|
7
7
|
importAPIs<T>(key: PluginIdentifier<T>): T;
|
|
8
8
|
|
|
9
|
-
getProperty(): Property;
|
|
10
|
-
|
|
11
9
|
getPlatform(): PluginPlatform;
|
|
12
10
|
}
|