SimpleTransport.d.ts 519 B

12345678910111213
  1. import { EventEmitter } from '../utils/EventEmitter.js';
  2. /**
  3. * Implements simple transport that allows sending string messages via
  4. * `sendCommand` and receiving them via `on('message')`.
  5. */
  6. export declare class SimpleTransport extends EventEmitter<Record<'message', string>> {
  7. #private;
  8. /**
  9. * @param sendCommandDelegate delegate to be called in `sendCommand`.
  10. */
  11. constructor(sendCommandDelegate: (plainCommand: string) => Promise<void>);
  12. sendCommand(plainCommand: string): Promise<void>;
  13. }