@lvce-editor/ipc 13.2.0 → 13.3.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +14 -4
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -10,9 +10,9 @@ interface IpcChild<WrapOptions = any, ListenOptions = any> {
10
10
  readonly wrap: (rawIpc: WrapOptions) => Ipc<WrapOptions>
11
11
  }
12
12
 
13
- interface IpcParent<T = any> {
14
- readonly create: (options: any) => Promise<T>
15
- readonly wrap: (rawIpc: T) => Ipc<T>
13
+ interface IpcParent<WrapOptions = any, CreateOptions = any> {
14
+ readonly create: (options: CreateOptions) => Promise<WrapOptions>
15
+ readonly wrap: (rawIpc: WrapOptions) => Ipc<WrapOptions>
16
16
  }
17
17
 
18
18
  interface IpcChildWithMessagePortListenOptions {
@@ -53,4 +53,14 @@ export const IpcParentWithNodeWorker: IpcParent<import('worker_threads').Worker>
53
53
  export const IpcParentWithElectronMessagePort: IpcParent<Electron.MessagePortMain>
54
54
  export const IpcParentWithWebSocket: IpcParent<WebSocket>
55
55
  export const IpcParentWithModuleWorker: IpcParent<Worker>
56
- export const IpcParentWithModuleWorkerAndWorkaroundForChromeDevtoolsBug: IpcParent<Worker>
56
+
57
+ interface IpcParentWithModuleWorkerAndWorkaroundForChromeDevtoolsBugCreateOptions {
58
+ readonly sendPort: ({ port, url, name }: { port: MessagePort; url: string; name: string }) => Promise<void>
59
+ readonly url: string
60
+ readonly name: string
61
+ }
62
+
63
+ export const IpcParentWithModuleWorkerAndWorkaroundForChromeDevtoolsBug: IpcParent<
64
+ Worker,
65
+ IpcParentWithModuleWorkerAndWorkaroundForChromeDevtoolsBugCreateOptions
66
+ >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/ipc",
3
- "version": "13.2.0",
3
+ "version": "13.3.0",
4
4
  "description": "Inter Process Communication for Lvce Editor",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",