Skip to content
5 changes: 5 additions & 0 deletions src/change_stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,11 @@ export class ChangeStream<
return this.cursor?.resumeToken;
}

/** Returns the currently buffered documents length of the underlying cursor. */
get bufferedCount(): number | undefined {
Comment thread
nbbeeken marked this conversation as resolved.
Outdated
return this.cursor?.bufferedCount();
}
Comment thread
nbbeeken marked this conversation as resolved.

/** Check if there is any document still available in the Change Stream */
async hasNext(): Promise<boolean> {
this._setIsIterator();
Expand Down