@tsed/event-emitter 8.34.0 → 8.35.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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { event, eventNS
|
|
1
|
+
import { OnOptions, event, eventNS } from "eventemitter2";
|
|
2
2
|
export declare function OnEvent(event: event | eventNS, options?: boolean | OnOptions): MethodDecorator;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/event-emitter",
|
|
3
|
+
"version": "8.35.0",
|
|
3
4
|
"description": "EventEmitter package for Ts.ED framework",
|
|
4
|
-
"type": "module",
|
|
5
|
-
"version": "8.34.0",
|
|
6
5
|
"source": "./src/index.ts",
|
|
6
|
+
"type": "module",
|
|
7
7
|
"main": "./lib/esm/index.js",
|
|
8
8
|
"module": "./lib/esm/index.js",
|
|
9
|
-
"typings": "./lib/types/index.d.ts",
|
|
10
9
|
"browser": "./lib/esm/index.js",
|
|
10
|
+
"typings": "./lib/types/index.d.ts",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
13
|
"tsed-source": "./src/index.ts",
|
|
@@ -28,12 +28,11 @@
|
|
|
28
28
|
"tslib": ">=2.7.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@tsed/barrels": "8.
|
|
32
|
-
"@tsed/core": "8.
|
|
33
|
-
"@tsed/di": "8.
|
|
34
|
-
"@tsed/platform-http": "8.
|
|
35
|
-
"@tsed/typescript": "8.
|
|
36
|
-
"eslint": "9.12.0",
|
|
31
|
+
"@tsed/barrels": "8.35.0",
|
|
32
|
+
"@tsed/core": "8.35.0",
|
|
33
|
+
"@tsed/di": "8.35.0",
|
|
34
|
+
"@tsed/platform-http": "8.35.0",
|
|
35
|
+
"@tsed/typescript": "8.35.0",
|
|
37
36
|
"eventemitter2": "^6.4.9",
|
|
38
37
|
"typescript": "6.0.2",
|
|
39
38
|
"vite": "7.3.2",
|
package/readme.md
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<div align="center">
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
<h1>Event Emitter</h1>
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
[](https://github.com/tsedio/tsed/actions?query=workflow%3A%22Build+%26+Release%22)
|
|
10
10
|
[](https://github.com/tsedio/tsed/blob/master/CONTRIBUTING.md)
|
|
11
11
|
[](https://badge.fury.io/js/%40tsed%2Fcommon)
|
|
@@ -88,9 +88,7 @@ interface OrderShippedEvent {
|
|
|
88
88
|
|
|
89
89
|
@Injectable()
|
|
90
90
|
export class SlackNotificationService {
|
|
91
|
-
@OnEvent("order.shipped", {
|
|
92
|
-
/* optional: add any option you would normally pass to emitter.on("order.shipped", options) */
|
|
93
|
-
})
|
|
91
|
+
@OnEvent("order.shipped", {/* optional: add any option you would normally pass to emitter.on("order.shipped", options) */})
|
|
94
92
|
sendOrderNotification(event: OrderShippedEvent) {
|
|
95
93
|
// implement something here
|
|
96
94
|
}
|