invoke

invoke: (channel: string, ...args: any[]) => Promise<any>

Send a message to the backend via channel and expect a result asynchronously.

@param channel - The name of the channel for the method. Must begin with the iTwinChannel prefix.

@see Electron ipcRenderer.invoke documentation for details. Note that this interface may be implemented via Electron for desktop apps, or via WebSockets for mobile or web-based Ipc connections. In either case, the Electron documentation provides the specifications for how it works.

@note args are serialized with the Structured Clone Algorithm, so only primitive types and ArrayBuffers are allowed.

Defined in

Last Updated: 13 June, 2024