import { Observable } from 'rxjs'; interface Stream { on(event: 'data' | 'error' | 'end', listener: (data: unknown) => void): unknown; removeListener(event: 'data' | 'error' | 'end', listener: (data: unknown) => void): unknown; cancel?(): void; } /** * Maps a regular stream object onto an RxJS `Observable` for the client to read. * Only `"data"`, `"error"` and `"end"` events will be transformed. * @param stream The stream to be transformed into an `Observable`. * @param cancelOnUnsubscribe If set to true, subscribing to, and subsequently * unsubscribing from the returned `Observable` will result in the cancellation of the stream. * Errors caused by the cancellation will be ignored. */ export declare function observableFromStream(stream: Stream, cancelOnUnsubscribe?: boolean): Observable; export {};