@lynx-js/web-worker-rpc 0.8.0 → 0.9.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @lynx-js/web-worker-rpc
2
2
 
3
+ ## 0.9.1
4
+
5
+ ## 0.9.0
6
+
7
+ ### Patch Changes
8
+
9
+ - feat: add a new type function RpcCallType ([#283](https://github.com/lynx-family/lynx-stack/pull/283))
10
+
3
11
  ## 0.8.0
4
12
 
5
13
  ### Patch Changes
@@ -0,0 +1,2 @@
1
+ import type { RpcEndpoint, RpcEndpointAsync, RpcEndpointAsyncVoid, RpcEndpointSync, RpcEndpointSyncVoid } from './RpcEndpoint.js';
2
+ export type RpcCallType<E extends RpcEndpoint<unknown[], unknown>> = E extends RpcEndpointSync<unknown[], unknown> ? (...args: E['_TypeParameters']) => E['_TypeReturn'] : E extends RpcEndpointSyncVoid<unknown[]> ? (...args: E['_TypeParameters']) => void : E extends RpcEndpointAsync<unknown[], unknown> ? (...args: E['_TypeParameters']) => Promise<E['_TypeReturn']> : E extends RpcEndpointAsyncVoid<unknown[]> ? (...args: E['_TypeParameters']) => void : never;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TypeUtils.js.map
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export { Rpc } from './Rpc.js';
2
2
  export type { RpcEndpoint, RpcEndpointSync, RpcEndpointSyncVoid, } from './RpcEndpoint.js';
3
3
  export { createRpcEndpoint } from './RpcEndpoint.js';
4
+ export type * from './TypeUtils.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-worker-rpc",
3
- "version": "0.8.0",
3
+ "version": "0.9.1",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [],