import { IPCEvents, IPCEventType, RequestStatus } from "../../../../../shared/types/ipcEvents"; import { WindowProxy } from "../windowProxy"; export type EventResponse = IPCEvents[T] extends { response: infer R; } ? R : never; export type IPCHandlerProps = IPCEvents[T]["data"]; export declare abstract class IPCHandler { abstract readonly name: T; abstract readonly type: IPCEvents[T]["type"]; abstract handle(window: WindowProxy, data: IPCEvents[T]["data"]): Promise>> | RequestStatus>; protected failed(err: unknown): { success: false; data?: never; error?: string; }; protected success(data: T): RequestStatus; protected success(): RequestStatus; protected tryUse(exec: () => T | Promise): Promise>; }