import { Observable } from "rxjs"; import { type Event } from "../event"; /** * Creates an observable stream of events from a MessagePort. * * @remarks * This function listens for "message" events on the port, filters for valid * RPC events, and emits them. It also handles the initial "READY" signal. * * @param port - The MessagePort to listen to. * @returns An Observable emitting valid RPC events. */ export declare function message$(port: MessagePort): Observable>; /** * Creates an observable stream that listens for specific UNSUBSCRIBE events. * * @remarks * This is used to detect when a client cancels a subscription to a specific * request ID. * * @param port - The MessagePort to listen to. * @param id - The request ID to listen for unsubscription. * @returns An Observable emitting the matching UNSUBSCRIBE event. */ export declare function unsubscribe$(port: MessagePort, id: string): Observable>;