import { Observable } from 'rxjs'; import { IpcEvent, IpcMessage, ProcessType, IpcFilter, IpcClient, IpcEventHandler, IpcEventObservable, IpcIdentifier, IpcHandlerRefs, IpcClientSendOptions } from './types'; import { SendResponse } from './SendResponse'; export * from './types'; export declare type SendDelegate = (channel: string, ...args: any) => void; export declare type HandlerRegistered = (args: { type: IpcMessage['type']; client: IpcIdentifier; }) => void; export declare type GetHandlerRefs = () => IpcHandlerRefs; export declare class Client implements IpcClient { static readonly MAIN = 0; readonly MAIN = 0; private readonly _; constructor(args: { process: ProcessType; events$: Observable; onSend: SendDelegate; onHandlerRegistered: HandlerRegistered; getHandlerRefs: GetHandlerRefs; }); readonly process: ProcessType; readonly channel: string; disposed$: Observable; isDisposed: boolean; timeout: number; readonly events$: IpcEventObservable; dispose(): void; readonly id: number; filter(criteria: IpcFilter | T['type']): Observable>; on(type: T['type']): Observable>; send(type: T['type'], payload: T['payload'], options?: IpcClientSendOptions): SendResponse; private _send; private readonly sendDelegate; handle(type: T['type'], handler: IpcEventHandler): this; private runHandlers; private readonly handlerRefs; private registeredClients; static asTarget(value?: number | number[]): number[]; static toIdentifier(ipc: IpcClient): IpcIdentifier; }