/// <reference types="node" />
/// <reference types="node" />
import { Cancellable } from "./cancellable";
import { Signal } from "./signals";
import { inspect } from "util";
export declare class Bus {
    private impl;
    detached: Signal<BusDetachedHandler>;
    message: Signal<BusMessageHandler>;
    constructor(impl: any);
    attach(cancellable?: Cancellable): Promise<void>;
    post(message: any, data?: Buffer | null): void;
    [inspect.custom](depth: any, options: any): string;
}
export declare type BusDetachedHandler = () => void;
export declare type BusMessageHandler = (message: any, data: Buffer | null) => void;
