IpcApp Class

The frontend of apps with a dedicated backend that can use Ipc.

Methods

Name Description
constructor(): IpcApp    
addListener(channel: string, handler: IpcListener): RemoveFunction Static Establish a message handler function for the supplied channel over Ipc.  
callIpcHost<T extends AsyncMethodsOf<IpcAppFunctions>>(methodName: T, ...args: Parameters<>): Promise<PromiseReturnType<>> Static   Deprecated  
invoke(channel: string, ...args: any[]): Promise<any> Static Send a message to the backend via channel and expect a result asynchronously.  
makeIpcProxy<K>(channelName: string): PickAsyncMethods<K> Static Create a type safe Proxy object to make IPC calls to a registered backend interface.  
removeListener(channel: string, listener: IpcListener): void Static Remove a previously registered listener  
send(channel: string, ...data: any[]): void Static Send a message over the socket.  
startup(ipc: IpcSocketFrontend, opts?: IpcAppOptions): Promise<void> Static start an IpcApp.  

Properties

Name Type Description
appFunctionIpc Static PickAsyncMethods<IpcAppFunctions> A Proxy to call one of the IpcAppFunctions functions via IPC.  
isValid Accessor StaticReadOnly boolean Determine whether Ipc is available for this frontend.  

Defined in

Last Updated: 30 November, 2023