import { IKernel } from 'jupyter-js-services';
export declare namespace shims {
    namespace services {
        /**
         * Public constructor
         * @param jsServicesKernel - jupyter-js-services IKernel instance
         */
        class CommManager {
            constructor(jsServicesKernel: IKernel);
            /**
             * Hookup kernel events.
             * @param  {IKernel} jsServicesKernel - jupyter-js-services IKernel instance
             */
            init_kernel(jsServicesKernel: any): void;
            /**
             * Creates a new connected comm
             * @param  {string} target_name
             * @param  {object} data
             * @param  {object} callbacks
             * @param  {object} metadata
             * @param  {string} comm_id
             * @return {Comm}
             */
            new_comm(target_name: string, data: any, callbacks: any, metadata: any, comm_id: string): Comm;
            /**
             * Register a comm target
             * @param  {string} target_name
             * @param  {(Comm, object) => void} f - callback that is called when the
             *                         comm is made.  Signature of f(comm, msg).
             */
            register_target(target_name: any, f: any): void;
            /**
             * Unregisters a comm target
             * @param  {string} target_name
             */
            unregister_target(target_name: any, f: any): void;
            /**
             * Register a comm in the mapping
             */
            register_comm: (comm: any) => any;
            targets: any;
            comms: any;
            kernel: IKernel;
            jsServicesKernel: IKernel;
        }
        /**
         * Public constructor
         * @param  {IComm} jsServicesComm - jupyter-js-services IComm instance
         */
        class Comm {
            constructor(jsServicesComm: IKernel.IComm);
            /**
             * Comm id
             * @return {string}
             */
            comm_id: string;
            /**
             * Target name
             * @return {string}
             */
            target_name: string;
            /**
             * Opens a sibling comm in the backend
             * @param  data
             * @param  callbacks
             * @param  metadata
             * @return msg id
             */
            open(data: any, callbacks: any, metadata: any): string;
            /**
             * Sends a message to the sibling comm in the backend
             * @param  data
             * @param  callbacks
             * @param  metadata
             * @param  buffers
             * @return message id
             */
            send(data: any, callbacks: any, metadata: any, buffers: ArrayBuffer[] | ArrayBufferView[]): string;
            /**
             * Closes the sibling comm in the backend
             * @param  data
             * @param  callbacks
             * @param  metadata
             * @return msg id
             */
            close(data?: any, callbacks?: any, metadata?: any): string;
            /**
             * Register a message handler
             * @param  callback, which is given a message
             */
            on_msg(callback: (x: any) => void): void;
            /**
             * Register a handler for when the comm is closed by the backend
             * @param  callback, which is given a message
             */
            on_close(callback: (x: any) => void): void;
            /**
             * Hooks callback object up with jupyter-js-services IKernelFuture
             * @param  jupyter-js-services IKernelFuture instance
             * @param  callbacks
             */
            _hookupCallbacks(future: IKernel.IFuture, callbacks: any): void;
            jsServicesComm: IKernel.IComm;
        }
    }
}
