fastevent 1.1.2 → 1.1.3
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/CHANGELOG.md +6 -0
- package/dist/devTools.d.mts +2 -2
- package/dist/devTools.d.ts +2 -2
- package/dist/index.d.mts +3 -6
- package/dist/index.d.ts +3 -6
- package/package.json +1 -1
- package/src/types.ts +1 -4
package/CHANGELOG.md
CHANGED
package/dist/devTools.d.mts
CHANGED
|
@@ -41,11 +41,11 @@ declare class WeakObjectMap<T extends object> {
|
|
|
41
41
|
has(key: string): boolean;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
interface FastEventMessage<T = string, P = any, M = unknown> {
|
|
45
45
|
type: T;
|
|
46
46
|
payload: P;
|
|
47
47
|
meta: M;
|
|
48
|
-
}
|
|
48
|
+
}
|
|
49
49
|
type FastEventListener<T = string, P = any, M = unknown, C = any> = (this: C, message: FastEventMessage<T, P, M>) => any | Promise<any>;
|
|
50
50
|
type FastListenerNode = {
|
|
51
51
|
__listeners: (FastEventListener<any, any, any> | [FastEventListener<any, any>, number])[];
|
package/dist/devTools.d.ts
CHANGED
|
@@ -41,11 +41,11 @@ declare class WeakObjectMap<T extends object> {
|
|
|
41
41
|
has(key: string): boolean;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
interface FastEventMessage<T = string, P = any, M = unknown> {
|
|
45
45
|
type: T;
|
|
46
46
|
payload: P;
|
|
47
47
|
meta: M;
|
|
48
|
-
}
|
|
48
|
+
}
|
|
49
49
|
type FastEventListener<T = string, P = any, M = unknown, C = any> = (this: C, message: FastEventMessage<T, P, M>) => any | Promise<any>;
|
|
50
50
|
type FastListenerNode = {
|
|
51
51
|
__listeners: (FastEventListener<any, any, any> | [FastEventListener<any, any>, number])[];
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
interface FastEventMessage<T = string, P = any, M = unknown> {
|
|
2
2
|
type: T;
|
|
3
3
|
payload: P;
|
|
4
4
|
meta: M;
|
|
5
|
-
}
|
|
5
|
+
}
|
|
6
6
|
type FastEventListener<T = string, P = any, M = unknown, C = any> = (this: C, message: FastEventMessage<T, P, M>) => any | Promise<any>;
|
|
7
7
|
type FastListenerNode = {
|
|
8
8
|
__listeners: (FastEventListener<any, any, any> | [FastEventListener<any, any>, number])[];
|
|
@@ -12,9 +12,6 @@ type FastListenerNode = {
|
|
|
12
12
|
type FastEventSubscriber = {
|
|
13
13
|
off: () => void;
|
|
14
14
|
};
|
|
15
|
-
interface FastEventListenerMeta {
|
|
16
|
-
emitter?: string;
|
|
17
|
-
}
|
|
18
15
|
type FastListeners = FastListenerNode;
|
|
19
16
|
type FastEventOptions<M = Record<string, any>> = {
|
|
20
17
|
id?: string;
|
|
@@ -467,4 +464,4 @@ declare class FastEvent<Events extends FastEvents = FastEvents, Meta extends Rec
|
|
|
467
464
|
scope<T extends string>(prefix: T): FastEventScope<ScopeEvents<Events, T>, Record<string, any>, any, keyof ScopeEvents<Events, T>>;
|
|
468
465
|
}
|
|
469
466
|
|
|
470
|
-
export { FastEvent, type FastEventListenOptions, type FastEventListener, type
|
|
467
|
+
export { FastEvent, type FastEventListenOptions, type FastEventListener, type FastEventMessage, type FastEventOptions, FastEventScope, type FastEventSubscriber, type FastEvents, type FastListenerNode, type FastListeners, type ScopeEvents };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
interface FastEventMessage<T = string, P = any, M = unknown> {
|
|
2
2
|
type: T;
|
|
3
3
|
payload: P;
|
|
4
4
|
meta: M;
|
|
5
|
-
}
|
|
5
|
+
}
|
|
6
6
|
type FastEventListener<T = string, P = any, M = unknown, C = any> = (this: C, message: FastEventMessage<T, P, M>) => any | Promise<any>;
|
|
7
7
|
type FastListenerNode = {
|
|
8
8
|
__listeners: (FastEventListener<any, any, any> | [FastEventListener<any, any>, number])[];
|
|
@@ -12,9 +12,6 @@ type FastListenerNode = {
|
|
|
12
12
|
type FastEventSubscriber = {
|
|
13
13
|
off: () => void;
|
|
14
14
|
};
|
|
15
|
-
interface FastEventListenerMeta {
|
|
16
|
-
emitter?: string;
|
|
17
|
-
}
|
|
18
15
|
type FastListeners = FastListenerNode;
|
|
19
16
|
type FastEventOptions<M = Record<string, any>> = {
|
|
20
17
|
id?: string;
|
|
@@ -467,4 +464,4 @@ declare class FastEvent<Events extends FastEvents = FastEvents, Meta extends Rec
|
|
|
467
464
|
scope<T extends string>(prefix: T): FastEventScope<ScopeEvents<Events, T>, Record<string, any>, any, keyof ScopeEvents<Events, T>>;
|
|
468
465
|
}
|
|
469
466
|
|
|
470
|
-
export { FastEvent, type FastEventListenOptions, type FastEventListener, type
|
|
467
|
+
export { FastEvent, type FastEventListenOptions, type FastEventListener, type FastEventMessage, type FastEventOptions, FastEventScope, type FastEventSubscriber, type FastEvents, type FastListenerNode, type FastListeners, type ScopeEvents };
|
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
export
|
|
4
|
+
export interface FastEventMessage<T = string, P = any, M = unknown> {
|
|
5
5
|
type: T
|
|
6
6
|
payload: P
|
|
7
7
|
meta: M
|
|
@@ -25,9 +25,6 @@ export type FastEventSubscriber = {
|
|
|
25
25
|
off: () => void
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
export interface FastEventListenerMeta {
|
|
29
|
-
emitter?: string
|
|
30
|
-
}
|
|
31
28
|
|
|
32
29
|
export type FastListeners = FastListenerNode
|
|
33
30
|
|