export = PairSession; /** * PairSession is returned by {@link Driver#onPair}. * @hideconstructor */ declare class PairSession { /** * @callback PairSession.Handler * @param {any} data * @returns {Promise} */ /** * Register a handler for an event. * setHandler accepts async functions that can receive and respond to messages from the pair view. * @param {string} event * @param {PairSession.Handler} handler */ setHandler(event: string, handler: PairSession.Handler): PairSession; /** * @param {string} event * @param {any} data * @returns {Promise} */ emit(event: string, data: any): Promise /** * Show a specific pairing step by its id. * @param {string} viewId * @returns {Promise} */ showView(viewId: string): Promise /** * Go to the next pairing step. * @returns {Promise} */ nextView(): Promise /** * Go back to the previous pairing step. * @returns {Promise} */ prevView(): Promise /** * Close the pairing session. * @returns {Promise} */ done(): Promise } declare namespace PairSession { type Handler = (data: any) => Promise; }