@lvce-editor/ipc 13.4.0 → 13.6.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 +7 -1
- package/dist/index.js +7 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -21,7 +21,13 @@ interface IpcChildWithMessagePortListenOptions {
|
|
|
21
21
|
|
|
22
22
|
// MessagePort specific implementations
|
|
23
23
|
export const IpcChildWithMessagePort: IpcChild<MessagePort, IpcChildWithMessagePortListenOptions>
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
interface IpcParentWithMessagePortCreateOptions {
|
|
26
|
+
readonly messagePort: MessagePort
|
|
27
|
+
readonly isMessagePortOpen?: boolean
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const IpcParentWithMessagePort: IpcParent<MessagePort, IpcParentWithMessagePortCreateOptions>
|
|
25
31
|
|
|
26
32
|
interface IpcChildWithElectronMessagePortListenOptions {
|
|
27
33
|
readonly messagePort: import('electron').MessagePortMain
|
package/dist/index.js
CHANGED
|
@@ -1227,8 +1227,13 @@ const create$5 = async ({
|
|
|
1227
1227
|
message: Message$1
|
|
1228
1228
|
});
|
|
1229
1229
|
messagePort.start();
|
|
1230
|
-
const
|
|
1231
|
-
|
|
1230
|
+
const {
|
|
1231
|
+
type,
|
|
1232
|
+
event
|
|
1233
|
+
} = await eventPromise;
|
|
1234
|
+
if (type !== Message$1) {
|
|
1235
|
+
throw new IpcError('Failed to wait for ipc message');
|
|
1236
|
+
}
|
|
1232
1237
|
if (event.data !== readyMessage) {
|
|
1233
1238
|
throw new IpcError('unexpected first message');
|
|
1234
1239
|
}
|