/** Subscription registered with a post-message bus. */
export interface MessageBusConnection<T> {
    /** Optional identifier used to address or remove the subscription. */
    id?: string;
    /** Callback invoked for each message delivered to the subscription. */
    listener: (arg: T) => void;
}
/** Public contract for Message Bus. */
export interface MessageBus<ListenerArg = unknown, Connection extends MessageBusConnection<ListenerArg> = MessageBusConnection<ListenerArg>> {
    /** Adds connection through the backing provider. */
    addConnection(connection: Connection): void;
    /** Configures or sends traffic over the post-message transport. */
    postMessage(message: unknown): void;
    /** Removes connection from this instance. */
    removeConnection(connection: Connection): void;
    /** Starts the transport or provider lifecycle. */
    start(): void;
    /** Stops the transport or provider lifecycle and releases owned listeners. */
    stop(): void;
}
//# sourceMappingURL=MessageBus.d.ts.map