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 | ||
invoke(channel: string, ...args: any[]): Promise<any> Static | Send a message to the backend via channel and expect a result asynchronously. |
|
makeIpcFunctionProxy<K>(channelName: string, functionName: string): PickAsyncMethods<K> Static | Create a type safe Proxy object to call an IPC function on a of registered backend handler that accepts a "methodName" argument followed by optional arguments | |
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 Static ReadOnly | boolean | Determine whether Ipc is available for this frontend. |
Defined in
- core/frontend/src/IpcApp.ts Line 28
Last Updated: 29 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.