Files
Folo/apps/desktop/layer/renderer/src/lib/client.ts
T
Innei 6c0226b47d chore(ipc): extract as electron-ipc-decorator
- Added electron-ipc-decorator as a dependency to streamline IPC method registration and context management.
- Refactored IPC service classes to utilize the new decorator, enhancing code organization and readability.
- Removed the base IPC context file, consolidating IPC logic within the decorator framework.
- Updated package.json files to include electron-ipc-decorator in both main and renderer processes.

These changes collectively enhance the IPC architecture, improving maintainability and reducing boilerplate code.

Signed-off-by: Innei <tukon479@gmail.com>
2025-08-22 16:59:53 +08:00

8 lines
281 B
TypeScript

import type { IpcServices } from "@follow/electron-main"
import type { IpcRenderer } from "electron"
import { createIpcProxy } from "electron-ipc-decorator/client"
export const ipcServices = createIpcProxy<IpcServices>(
window.electron?.ipcRenderer as unknown as IpcRenderer,
)