@compass-framework/plugin 1.0.9 → 1.0.11
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,13 +2,11 @@ import {Context} from "@compass-framework/core";
|
|
|
2
2
|
import {Platform} from "./Platform";
|
|
3
3
|
import {Identifier} from "./Identifier";
|
|
4
4
|
|
|
5
|
-
export declare interface Environment
|
|
5
|
+
export declare interface Environment {
|
|
6
6
|
exportAPIs(apis: object): void;
|
|
7
7
|
|
|
8
8
|
importAPIs<T>(key: Identifier<T>): T;
|
|
9
9
|
|
|
10
|
-
getProperty(): Property;
|
|
11
|
-
|
|
12
10
|
getContext(): Context;
|
|
13
11
|
|
|
14
12
|
getPlatform(): Platform;
|
package/@types/Identifier.d.ts
CHANGED
package/@types/Plugin.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {Environment} from "./Environment";
|
|
2
2
|
import {Identifier} from "./Identifier";
|
|
3
3
|
|
|
4
|
-
export declare abstract class Plugin<
|
|
5
|
-
public abstract
|
|
4
|
+
export declare abstract class Plugin<Arguments> {
|
|
5
|
+
public abstract onCreated(args: Arguments): Identifier;
|
|
6
6
|
|
|
7
|
-
public abstract
|
|
7
|
+
public abstract onRemoved(): void;
|
|
8
8
|
|
|
9
|
-
public abstract
|
|
9
|
+
public abstract onFinished(env: Environment): void;
|
|
10
10
|
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Context
|
|
3
|
-
} from "@compass-framework/core";
|
|
4
|
-
|
|
1
|
+
import { Context } from "@compass-framework/core";
|
|
5
2
|
import { Plugin } from "./Plugin";
|
|
6
3
|
|
|
7
|
-
export declare class PluginManager<
|
|
8
|
-
public constructor(context: Context,
|
|
4
|
+
export declare class PluginManager<Arguments> {
|
|
5
|
+
public constructor(context: Context, args: Arguments);
|
|
9
6
|
|
|
10
|
-
public install(plugin: Plugin): void;
|
|
7
|
+
public install(plugin: Plugin<Arguments>): void;
|
|
11
8
|
|
|
12
|
-
public uninstall(plugin: Plugin): void;
|
|
9
|
+
public uninstall(plugin: Plugin<Arguments>): void;
|
|
13
10
|
}
|