@anephenix/event-emitter 0.0.4 → 0.0.5
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/package.json +1 -7
- package/src/EventEmitter.ts +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anephenix/event-emitter",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "A small EventEmitter library",
|
|
5
5
|
"author": "Paul Jensen <paul@anephenix.com>",
|
|
6
6
|
"maintainers": [
|
|
@@ -24,12 +24,6 @@
|
|
|
24
24
|
"type": "module",
|
|
25
25
|
"main": ".dist/index.js",
|
|
26
26
|
"types": "./dist/index.d.ts",
|
|
27
|
-
"exports": {
|
|
28
|
-
".": {
|
|
29
|
-
"import": "./dist/index.js",
|
|
30
|
-
"types": "./dist/index.d.ts"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
27
|
"files": [
|
|
34
28
|
"dist",
|
|
35
29
|
"src"
|
package/src/EventEmitter.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Generic type for an event map where each key has a listener signature
|
|
2
|
-
|
|
2
|
+
// biome-ignore lint/suspicious/noExplicitAny:
|
|
3
|
+
type EventMap = Record<string, (...args: any[]) => void>;
|
|
3
4
|
|
|
4
5
|
class EventEmitter<T extends EventMap> {
|
|
5
6
|
events: { [K in keyof T]?: T[K][] } = {};
|