@anephenix/event-emitter 0.0.10 → 0.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/README.md +5 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -82,7 +82,10 @@ The library allows you to define that by using a type that is passed to the
|
|
|
82
82
|
setup of the EventEmitter instance, like this:
|
|
83
83
|
|
|
84
84
|
```typescript
|
|
85
|
-
type
|
|
85
|
+
// Load the EventEmitter and EventMap type from the library
|
|
86
|
+
import EventEmitter, { type EventMap } from "@anephenix/event-emitter";
|
|
87
|
+
|
|
88
|
+
type MyEvents = EventMap & {
|
|
86
89
|
message: (data: { name: string; text: string }) => void;
|
|
87
90
|
join: (username: string) => void;
|
|
88
91
|
leave: (username: string) => void;
|
|
@@ -115,4 +118,4 @@ npm t
|
|
|
115
118
|
|
|
116
119
|
## Licence and Credits
|
|
117
120
|
|
|
118
|
-
©2025 Anephenix OÜ. EventEmitter is licenced under the MIT licence.
|
|
121
|
+
©2025 Anephenix OÜ. EventEmitter is licenced under the MIT licence.
|