bidiServerRunner.d.ts 629 B

123456789101112131415
  1. import debug from 'debug';
  2. import type { ITransport } from '../utils/transport.js';
  3. export declare const debugInfo: debug.Debugger;
  4. export declare class BidiServerRunner {
  5. #private;
  6. /**
  7. *
  8. * @param bidiPort port to start ws server on
  9. * @param onNewBidiConnectionOpen delegate to be called for each new
  10. * connection. `onNewBidiConnectionOpen` delegate should return another
  11. * `onConnectionClose` delegate, which will be called after the connection is
  12. * closed.
  13. */
  14. run(bidiPort: number, onNewBidiConnectionOpen: (bidiServer: ITransport) => Promise<() => void> | (() => void)): void;
  15. }