(methodName: string, ...args: unknown[])
| 501 | }; |
| 502 | |
| 503 | const invokeSyncMethod = async (methodName: string, ...args: unknown[]) => { |
| 504 | try { |
| 505 | return await invokeWithNormalizedError('main.invoke', 'sync', methodName, ...args); |
| 506 | } catch (error) { |
| 507 | if (isUserAbortResolveMergeConflictError(error)) { |
| 508 | throw new UserAbortResolveMergeConflictError( |
| 509 | 'message' in error && typeof error.message === 'string' ? error.message : undefined, |
| 510 | ); |
| 511 | } |
| 512 | |
| 513 | throw error; |
| 514 | } |
| 515 | }; |
| 516 | |
| 517 | if (process.contextIsolated) { |
| 518 | contextBridge.exposeInMainWorld('main', main); |
no test coverage detected