@sheto/emiter 1.0.0 → 1.0.1
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/index.d.ts +14 -0
- package/index.js +2 -2
- package/package.json +1 -1
- package/types/index.d.ts +0 -14
package/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type ActionType = (payload?: any) => void;
|
|
2
|
+
interface EmiterType {
|
|
3
|
+
timer: null | number;
|
|
4
|
+
queue: {
|
|
5
|
+
name: string;
|
|
6
|
+
payload: any;
|
|
7
|
+
}[];
|
|
8
|
+
actions: Record<string, ActionType[]>;
|
|
9
|
+
emit: (eventName: string, payload?: any) => void;
|
|
10
|
+
on: (eventName: string, action: ActionType) => void;
|
|
11
|
+
release(eventNames: string[]): void;
|
|
12
|
+
}
|
|
13
|
+
export declare const globalEmiter: EmiterType;
|
|
14
|
+
export default globalEmiter;
|
package/index.js
CHANGED
package/package.json
CHANGED
package/types/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
type actionType = (payload?: any) => void;
|
|
2
|
-
interface EmiterType {
|
|
3
|
-
timer: null | number;
|
|
4
|
-
queue: {
|
|
5
|
-
name: string;
|
|
6
|
-
payload: any;
|
|
7
|
-
}[];
|
|
8
|
-
actions: Record<string, actionType[]>;
|
|
9
|
-
emit: (eventName: string, payload?: any) => void;
|
|
10
|
-
on: (eventName: string, action: actionType) => void;
|
|
11
|
-
release(eventNames: string[]): void;
|
|
12
|
-
}
|
|
13
|
-
export declare const EmiterPlugin: EmiterType;
|
|
14
|
-
export default EmiterPlugin;
|