import type { BrowserWindow, IpcMainEvent } from 'electron'; import { Observable } from 'rxjs'; import { type IpcScope } from '../constants/ipc'; import { MapValueToObservable, type Obj } from '@cycle-mega-driver/common/lib'; export declare const mapToIpcSink: (input: MapValueToObservable) => Observable>; /** * raw messages between main and renderer */ export declare type ChannelConfigToSink = { [K in keyof T]: { channel: K; data: T[K]; }; }[keyof T]; export interface IpcSource { channel: Channel; data: Data; event: IpcMainEvent; browserWindow?: BrowserWindow; } /** * renderer to main messages */ export declare type ChannelConfigToWebSource = { [K in keyof T]: IpcSource; }[keyof T]; /** * main to renderer messages */ export declare type ChannelConfigToWebSink = { [K in keyof T]: { channel: K; data: T[K]; } & IpcScope; }[keyof T];