@compass-framework/plugin 1.0.10 → 1.0.12
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/Environment.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import {Context} from "@compass-framework/core";
|
|
|
2
2
|
import {Platform} from "./Platform";
|
|
3
3
|
import {Identifier} from "./Identifier";
|
|
4
4
|
|
|
5
|
-
export
|
|
5
|
+
export interface Environment<Property> {
|
|
6
6
|
exportAPIs(apis: object): void;
|
|
7
7
|
|
|
8
8
|
importAPIs<T>(key: Identifier<T>): T;
|
package/@types/Identifier.d.ts
CHANGED
package/@types/Plugin.d.ts
CHANGED
|
@@ -2,9 +2,11 @@ import {Environment} from "./Environment";
|
|
|
2
2
|
import {Identifier} from "./Identifier";
|
|
3
3
|
|
|
4
4
|
export declare abstract class Plugin<Property> {
|
|
5
|
-
public abstract
|
|
5
|
+
public abstract onCreated(property: Property): Identifier;
|
|
6
6
|
|
|
7
|
-
public abstract
|
|
7
|
+
public abstract onMounted(env: Environment<Property>): void;
|
|
8
|
+
|
|
9
|
+
public abstract onRemoved(): void;
|
|
8
10
|
|
|
9
11
|
public abstract getIdentifier(): Identifier;
|
|
10
12
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import {Context} from "@compass-framework/core";
|
|
2
|
+
import {Plugin} from "./Plugin";
|
|
3
3
|
|
|
4
4
|
export declare class PluginManager<Property> {
|
|
5
5
|
public constructor(context: Context, property: Property);
|
|
6
6
|
|
|
7
|
-
public
|
|
7
|
+
public usePlugin(plugin: Plugin<Property>): void;
|
|
8
8
|
|
|
9
|
-
public
|
|
9
|
+
public unUsePlugin(plugin: Plugin<Property>): void;
|
|
10
10
|
}
|