Mongodb: Fix typos: Cursor#max and Cursor#min (#35120)

* Fix typos: Cursor#max and Cursor#min

Referring to the documentation I updated types. See [Cursor#min](http://mongodb.github.io/node-mongodb-native/3.1/api/Cursor.html#min) and [Cursor#max](http://mongodb.github.io/node-mongodb-native/3.1/api/Cursor.html#max)

* mongodb: fix types
This commit is contained in:
kan_a_17
2019-04-30 21:43:15 -07:00
committed by Wesley Wigham
parent 7e47948742
commit f41b3b4ac0
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1756,7 +1756,7 @@ export class Cursor<T = Default> extends Readable {
/** http://mongodb.github.io/node-mongodb-native/3.1/api/Cursor.html#map */
map<U>(transform: (document: T) => U): Cursor<U>;
/** http://mongodb.github.io/node-mongodb-native/3.1/api/Cursor.html#max */
max(max: number): Cursor<T>;
max(max: object): Cursor<T>;
/** http://mongodb.github.io/node-mongodb-native/3.1/api/Cursor.html#maxAwaitTimeMS */
maxAwaitTimeMS(value: number): Cursor<T>;
/** http://mongodb.github.io/node-mongodb-native/3.1/api/Cursor.html#maxScan */
@@ -1764,7 +1764,7 @@ export class Cursor<T = Default> extends Readable {
/** http://mongodb.github.io/node-mongodb-native/3.1/api/Cursor.html#maxTimeMS */
maxTimeMS(value: number): Cursor<T>;
/** http://mongodb.github.io/node-mongodb-native/3.1/api/Cursor.html#min */
min(min: number): Cursor<T>;
min(min: object): Cursor<T>;
/** http://mongodb.github.io/node-mongodb-native/3.1/api/Cursor.html#next */
next(): Promise<T | null>;
next(callback: MongoCallback<T | null>): void;
+2 -2
View File
@@ -106,8 +106,8 @@ mongodb.MongoClient.connect(connectionString, options, (err: mongodb.MongoError,
cursor = cursor.hint('age_1');
cursor = cursor.limit(1);
cursor = cursor.map((result) => {});
cursor = cursor.max(1);
cursor = cursor.min(1);
cursor = cursor.max({ age: 130 });
cursor = cursor.min({ age: 18 });
cursor = cursor.maxAwaitTimeMS(1);
cursor = cursor.maxScan({});
cursor = cursor.maxTimeMS(1);