* Return a modified Readable stream including a possible transform method. * * NOTE: When using a Stream to process change stream events, the stream will * NOT automatically resume in the case a resumable error is encountered. * * @throws MongoChangeStreamError if the underlying curso
()
| 866 | * @throws MongoChangeStreamError if the underlying cursor or the change stream is closed |
| 867 | */ |
| 868 | stream(): Readable & AsyncIterable<TChange> { |
| 869 | if (this.closed) { |
| 870 | throw new MongoChangeStreamError(CHANGESTREAM_CLOSED_ERROR); |
| 871 | } |
| 872 | |
| 873 | return this.cursor.stream(); |
| 874 | } |
| 875 | |
| 876 | /** @internal */ |
| 877 | private _setIsEmitter(): void { |
no outgoing calls