@compass-framework/plugin 1.2.6 → 1.2.7
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,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import {PluginRuntime} from "./PluginRuntime";
|
|
2
|
+
import {PluginIdentifier} from "./PluginIdentifier";
|
|
3
3
|
|
|
4
|
-
export declare abstract class
|
|
5
|
-
public abstract onCreated(args: Arguments):
|
|
4
|
+
export declare abstract class BasePlugin<Property, Arguments> {
|
|
5
|
+
public abstract onCreated(args: Arguments): PluginIdentifier;
|
|
6
6
|
|
|
7
|
-
public abstract onMounted(env:
|
|
7
|
+
public abstract onMounted(env: PluginRuntime<Property>): void;
|
|
8
8
|
|
|
9
9
|
public abstract onRemoved(): void;
|
|
10
10
|
|
|
11
|
-
public abstract getIdentifier():
|
|
11
|
+
public abstract getIdentifier(): PluginIdentifier;
|
|
12
12
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {BasePlugin} from "./BasePlugin";
|
|
2
2
|
|
|
3
|
-
export declare abstract class
|
|
3
|
+
export declare abstract class BasePluginManager<Property, Arguments> {
|
|
4
4
|
protected constructor(args: Arguments);
|
|
5
5
|
|
|
6
6
|
public abstract getPluginProperty(): Property;
|
|
7
7
|
|
|
8
|
-
public installPlugin(plugin:
|
|
8
|
+
public installPlugin(plugin: BasePlugin<Property, Arguments>): void;
|
|
9
9
|
|
|
10
|
-
public unInstallPlugin(plugin:
|
|
10
|
+
public unInstallPlugin(plugin: BasePlugin<Property, Arguments>): void;
|
|
11
11
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {PluginIdentifier} from "./PluginIdentifier";
|
|
2
2
|
import {PluginPlatform} from "./PluginPlatform";
|
|
3
3
|
|
|
4
|
-
export interface
|
|
4
|
+
export interface PluginRuntime<Property> {
|
|
5
5
|
exportAPIs(apis: object): void;
|
|
6
6
|
|
|
7
7
|
importAPIs<T>(key: PluginIdentifier<T>): T;
|