Skip to content

Commit 7c3b34c

Browse files
W-A-Jamesnbbeeken
authored andcommitted
continue adding API docs
1 parent a294bd1 commit 7c3b34c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/cursor/abstract_cursor.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ export const CursorTimeoutMode = Object.freeze({
7373
* `cursor.next()`.
7474
* When set to `'cursorLifetime'`, the deadline applies to the life of the entire cursor.
7575
*
76+
* Depending on the type of cursor being used, this option has different default values.
77+
* For non-tailable cursors, this value defaults to `'cursorLifetime'`
78+
* For tailable cursors, this value defaults to `'iteration'` since tailable cursors, by
79+
* definition can have an arbitrarily long lifetime.
80+
*
7681
* @example
7782
* # Example showing use of `'iteration'`
7883
* ```ts

src/cursor/run_command_cursor.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ import {
1919
export type RunCursorCommandOptions = {
2020
readPreference?: ReadPreferenceLike;
2121
session?: ClientSession;
22-
/** @internal */
22+
/** Specifies the time an operation will run until it throws a timeout error. Note that if
23+
* `maxTimeMS` is provided in the command in addition to setting `timeoutMS` in the options, then
24+
* the original value of `maxTimeMS` will be overwritten. */
2325
timeoutMS?: number;
24-
/** @internal */
26+
/** See {@link CursorTimeoutMode} */
2527
timeoutMode?: CursorTimeoutMode;
2628
tailable?: boolean;
2729
awaitData?: boolean;

0 commit comments

Comments
 (0)