📄 useIpcRendererInvoke¶
📊 Analysis Summary¶
| Metric | Count |
|---|---|
| 🔧 Functions | 1 |
| 📦 Imports | 3 |
📚 Table of Contents¶
🛠️ File Location:¶
📂 packages/electron/useIpcRendererInvoke/index.ts
📦 Imports¶
| Name | Source |
|---|---|
IpcRenderer |
electron |
ShallowRef |
vue |
shallowRef |
vue |
Functions¶
useIpcRendererInvoke(ipcRenderer: IpcRenderer, channel: string, args: any[]): ShallowRef<T | null>¶
Returns Promise
Send a message to the main process via channel and expect a result ~~asynchronously~~. As composition-api, it makes asynchronous operations look like synchronous.
You need to provide ipcRenderer to this function.
See: https://www.electronjs.org/docs/api/ipc-renderer#ipcrendererinvokechannel-args, https://vueuse.org/useIpcRendererInvoke
Tags: @__NO_SIDE_EFFECTS__
Raw JSDoc
/**
* Returns Promise<any> - Resolves with the response from the main process.
*
* Send a message to the main process via channel and expect a result ~~asynchronously~~. As composition-api, it makes asynchronous operations look like synchronous.
*
* You need to provide `ipcRenderer` to this function.
*
* @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrendererinvokechannel-args
* @see https://vueuse.org/useIpcRendererInvoke
*
* @__NO_SIDE_EFFECTS__
*/
Code
Generated by Syntax Scribe