@magek/common 0.0.8 → 0.0.10
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.
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { Register } from './register';
|
|
2
2
|
import { EventInterface } from './event';
|
|
3
3
|
import { NotificationInterface } from './notification';
|
|
4
|
-
|
|
4
|
+
import { Class } from '../typelevel';
|
|
5
|
+
/**
|
|
6
|
+
* Interface for event handler classes.
|
|
7
|
+
* Event handlers must have a static `handle` method that processes events.
|
|
8
|
+
*
|
|
9
|
+
* Similar to CommandInterface, this describes the class itself (with static methods),
|
|
10
|
+
* not instances of the class.
|
|
11
|
+
*/
|
|
12
|
+
export interface EventHandlerInterface extends Class<unknown> {
|
|
5
13
|
handle(event: EventInterface | NotificationInterface, register: Register): Promise<void>;
|
|
6
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magek/common",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "Contains Magek common helpers used by the core and provider packages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"framework-common-helpers"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"uuid": "^13.0.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@magek/eslint-config": "^0.0.
|
|
36
|
+
"@magek/eslint-config": "^0.0.10",
|
|
37
37
|
"@types/chai": "5.2.3",
|
|
38
38
|
"@types/chai-as-promised": "8.0.2",
|
|
39
39
|
"@types/mocha": "10.0.10",
|