handle Method

Establish a backend implementation of an Ipc interface for a channel.

handle(channel: string, handler: (...args: any[]) => Promise<any>): RemoveFunction

note returns A function to call to remove the handler.

Parameter Type Description
channel string The name of the channel for this handler. Must begin with the iTwinChannel prefix.
handler (...args: any[]) => Promise<any> A function that supplies the implementation for methods invoked over channel via IpcSocketFrontend.invoke

Returns - RemoveFunction

Defined in

Last Updated: 12 June, 2024