js-rpc2 2.2.0 → 2.2.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.
Files changed (2) hide show
  1. package/package.json +3 -2
  2. package/src/types.ts +5 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "js-rpc2",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "js web websocket http rpc",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -21,7 +21,8 @@
21
21
  "web",
22
22
  "http",
23
23
  "websocket",
24
- "rpc"
24
+ "rpc",
25
+ "electron"
25
26
  ],
26
27
  "author": "yuanliwei",
27
28
  "license": "MIT",
package/src/types.ts CHANGED
@@ -52,6 +52,11 @@ export declare namespace Electron {
52
52
 
53
53
  const NodeEventEmitter: typeof import('events').EventEmitter;
54
54
 
55
+ interface MessageEvent {
56
+ data: any;
57
+ ports: MessagePortMain[];
58
+ }
59
+
55
60
  class MessagePortMain extends NodeEventEmitter {
56
61
 
57
62
  // Docs: https://electronjs.org/docs/api/message-port-main