@lvce-editor/json-rpc 3.0.0 → 4.0.0

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/dist/index.d.ts CHANGED
@@ -6,12 +6,11 @@ export const invoke: (
6
6
  ...params: any[]
7
7
  ) => Promise<any>
8
8
 
9
- interface InvokeAndTransfer {
10
- (ipc: any, transfer: any, method: string, ...params: any[]): Promise<any>
11
- (ipc: any, method: string, ...params: any[]): Promise<any>
12
- }
13
-
14
- export const invokeAndTransfer: InvokeAndTransfer
9
+ export const invokeAndTransfer: (
10
+ ipc: any,
11
+ method: string,
12
+ ...params: any[]
13
+ ) => Promise<any>
15
14
 
16
15
  export const resolve: (id: number, message: any) => void
17
16
 
package/dist/index.js CHANGED
@@ -404,14 +404,7 @@ const invoke = async (ipc, method, ...params) => {
404
404
  const result = unwrapJsonRpcResult(responseMessage);
405
405
  return result;
406
406
  };
407
-
408
- // TODO deprecated old typings,
409
- // always use automatic transferrable detection
410
- const invokeAndTransfer = async (ipc, handle, method, ...params) => {
411
- if (typeof handle === 'string') {
412
- params = [method, ...params];
413
- method = handle;
414
- }
407
+ const invokeAndTransfer = async (ipc, method, ...params) => {
415
408
  const {
416
409
  message,
417
410
  promise
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/json-rpc",
3
- "version": "3.0.0",
3
+ "version": "4.0.0",
4
4
  "description": "JsonRpc implementation",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -11,6 +11,6 @@
11
11
  "author": "Lvce Editor",
12
12
  "license": "MIT",
13
13
  "dependencies": {
14
- "@lvce-editor/assert": "^1.2.0"
14
+ "@lvce-editor/assert": "^1.3.0"
15
15
  }
16
16
  }