cgserver 6.5.2 → 6.5.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/README.md CHANGED
@@ -1,2 +1,4 @@
1
+ 6.5.3
2
+ 1、事件分发器GEventTool添加emit
1
3
  6.5.2
2
4
  1、添加事件分发器GEventTool
@@ -16,5 +16,8 @@ class EventTool {
16
16
  once(event, func) {
17
17
  this._event_emitter.once(event, func);
18
18
  }
19
+ emit(event, ...args) {
20
+ this._event_emitter.emit(event, ...args);
21
+ }
19
22
  }
20
23
  exports.GEventTool = new EventTool();
@@ -6,6 +6,7 @@ declare class EventTool {
6
6
  on(event: string, func: (...args: any[]) => void): void;
7
7
  off(event: string, func: (...args: any[]) => void): void;
8
8
  once(event: string, func: (...args: any[]) => void): void;
9
+ emit(event: string, ...args: any[]): void;
9
10
  }
10
11
  export declare let GEventTool: EventTool;
11
12
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cgserver",
3
- "version": "6.5.2",
3
+ "version": "6.5.3",
4
4
  "author": "trojan",
5
5
  "type": "commonjs",
6
6
  "description": "free for all.Websocket or Http",