@@ -495,7 +495,7 @@ Collection.prototype.find = deprecateOptions(
495
495
* @param {(number|string) } [options.w] DEPRECATED: The write concern. Use writeConcern instead.
496
496
* @param {number } [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
497
497
* @param {boolean } [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
498
- * @param {object } [options.writeConcern] Specify write concern settings.
498
+ * @param {object|WriteConcern } [options.writeConcern] Specify write concern settings.
499
499
* @param {boolean } [options.checkKeys=true] If true, will throw if bson documents start with `$` or include a `.` in any key value
500
500
* @param {boolean } [options.serializeFunctions=false] Serialize functions on any object.
501
501
* @param {boolean } [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
@@ -532,7 +532,7 @@ Collection.prototype.insertOne = function(doc, options, callback) {
532
532
* @param {(number|string) } [options.w] DEPRECATED: The write concern. Use writeConcern instead.
533
533
* @param {number } [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
534
534
* @param {boolean } [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
535
- * @param {object } [options.writeConcern] Specify write concern settings.
535
+ * @param {object|WriteConcern } [options.writeConcern] Specify write concern settings.
536
536
* @param {boolean } [options.checkKeys=true] If true, will throw if bson documents start with `$` or include a `.` in any key value
537
537
* @param {boolean } [options.serializeFunctions=false] Serialize functions on any object.
538
538
* @param {boolean } [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
@@ -600,7 +600,7 @@ Collection.prototype.insertMany = function(docs, options, callback) {
600
600
* @param {(number|string) } [options.w] DEPRECATED: The write concern. Use writeConcern instead.
601
601
* @param {number } [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
602
602
* @param {boolean } [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
603
- * @param {object } [options.writeConcern] Specify write concern settings.
603
+ * @param {object|WriteConcern } [options.writeConcern] Specify write concern settings.
604
604
* @param {boolean } [options.checkKeys=false] If true, will throw if bson documents start with `$` or include a `.` in any key value
605
605
* @param {boolean } [options.serializeFunctions=false] Serialize functions on any object.
606
606
* @param {boolean } [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
@@ -682,7 +682,7 @@ Collection.prototype.bulkWrite = function(operations, options, callback) {
682
682
* @param {(number|string) } [options.w] DEPRECATED: The write concern. Use writeConcern instead.
683
683
* @param {number } [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
684
684
* @param {boolean } [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
685
- * @param {object } [options.writeConcern] Specify write concern settings.
685
+ * @param {object|WriteConcern } [options.writeConcern] Specify write concern settings.
686
686
* @param {boolean } [options.serializeFunctions=false] Serialize functions on any object.
687
687
* @param {boolean } [options.forceServerObjectId=false] Force server to assign _id values instead of driver.
688
688
* @param {boolean } [options.bypassDocumentValidation=false] Allow driver to bypass schema validation in MongoDB 3.2 or higher.
@@ -740,7 +740,7 @@ Collection.prototype.insert = deprecate(function(docs, options, callback) {
740
740
* @param {(number|string) } [options.w] DEPRECATED: The write concern. Use writeConcern instead.
741
741
* @param {number } [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
742
742
* @param {boolean } [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
743
- * @param {object } [options.writeConcern] Specify write concern settings.
743
+ * @param {object|WriteConcern } [options.writeConcern] Specify write concern settings.
744
744
* @param {boolean } [options.checkKeys=false] If true, will throw if bson documents start with `$` or include a `.` in any key value
745
745
* @param {boolean } [options.serializeFunctions=false] Serialize functions on any object.
746
746
* @param {boolean } [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
@@ -778,7 +778,7 @@ Collection.prototype.updateOne = function(filter, update, options, callback) {
778
778
* @param {(number|string) } [options.w] DEPRECATED: The write concern. Use writeConcern instead.
779
779
* @param {number } [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
780
780
* @param {boolean } [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
781
- * @param {object } [options.writeConcern] Specify write concern settings.
781
+ * @param {object|WriteConcern } [options.writeConcern] Specify write concern settings.
782
782
* @param {boolean } [options.checkKeys=false] If true, will throw if bson documents start with `$` or include a `.` in any key value
783
783
* @param {boolean } [options.serializeFunctions=false] Serialize functions on any object.
784
784
* @param {boolean } [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
@@ -817,7 +817,7 @@ Collection.prototype.replaceOne = function(filter, doc, options, callback) {
817
817
* @param {(number|string) } [options.w] DEPRECATED: The write concern. Use writeConcern instead.
818
818
* @param {number } [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
819
819
* @param {boolean } [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
820
- * @param {object } [options.writeConcern] Specify write concern settings.
820
+ * @param {object|WriteConcern } [options.writeConcern] Specify write concern settings.
821
821
* @param {boolean } [options.checkKeys=false] If true, will throw if bson documents start with `$` or include a `.` in any key value
822
822
* @param {boolean } [options.serializeFunctions=false] Serialize functions on any object.
823
823
* @param {boolean } [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
@@ -851,7 +851,7 @@ Collection.prototype.updateMany = function(filter, update, options, callback) {
851
851
* @param {(number|string) } [options.w] DEPRECATED: The write concern. Use writeConcern instead.
852
852
* @param {number } [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
853
853
* @param {boolean } [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
854
- * @param {object } [options.writeConcern] Specify write concern settings.
854
+ * @param {object|WriteConcern } [options.writeConcern] Specify write concern settings.
855
855
* @param {boolean } [options.upsert=false] Update operation is an upsert.
856
856
* @param {boolean } [options.multi=false] Update one/all documents with operation.
857
857
* @param {boolean } [options.bypassDocumentValidation=false] Allow driver to bypass schema validation in MongoDB 3.2 or higher.
@@ -908,7 +908,7 @@ Collection.prototype.update = deprecate(function(selector, update, options, call
908
908
* @param {(number|string) } [options.w] DEPRECATED: The write concern. Use writeConcern instead.
909
909
* @param {number } [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
910
910
* @param {boolean } [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
911
- * @param {object } [options.writeConcern] Specify write concern settings.
911
+ * @param {object|WriteConcern } [options.writeConcern] Specify write concern settings.
912
912
* @param {boolean } [options.checkKeys=false] If true, will throw if bson documents start with `$` or include a `.` in any key value
913
913
* @param {boolean } [options.serializeFunctions=false] Serialize functions on any object.
914
914
* @param {boolean } [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
@@ -943,7 +943,7 @@ Collection.prototype.removeOne = Collection.prototype.deleteOne;
943
943
* @param {(number|string) } [options.w] DEPRECATED: The write concern. Use writeConcern instead.
944
944
* @param {number } [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
945
945
* @param {boolean } [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
946
- * @param {object } [options.writeConcern] Specify write concern settings.
946
+ * @param {object|WriteConcern } [options.writeConcern] Specify write concern settings.
947
947
* @param {boolean } [options.checkKeys=false] If true, will throw if bson documents start with `$` or include a `.` in any key value
948
948
* @param {boolean } [options.serializeFunctions=false] Serialize functions on any object.
949
949
* @param {boolean } [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
@@ -978,7 +978,7 @@ Collection.prototype.removeMany = Collection.prototype.deleteMany;
978
978
* @param {(number|string) } [options.w] DEPRECATED: The write concern. Use writeConcern instead.
979
979
* @param {number } [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
980
980
* @param {boolean } [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
981
- * @param {object } [options.writeConcern] Specify write concern settings.
981
+ * @param {object|WriteConcern } [options.writeConcern] Specify write concern settings.
982
982
* @param {boolean } [options.single=false] Removes the first document found.
983
983
* @param {ClientSession } [options.session] optional session to use for this operation
984
984
* @param {Collection~writeOpCallback } [callback] The command result callback
@@ -1012,7 +1012,7 @@ Collection.prototype.remove = deprecate(function(selector, options, callback) {
1012
1012
* @param {(number|string) } [options.w] DEPRECATED: The write concern. Use writeConcern instead.
1013
1013
* @param {number } [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
1014
1014
* @param {boolean } [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
1015
- * @param {object } [options.writeConcern] Specify write concern settings.
1015
+ * @param {object|WriteConcern } [options.writeConcern] Specify write concern settings.
1016
1016
* @param {ClientSession } [options.session] optional session to use for this operation
1017
1017
* @param {Collection~writeOpCallback } [callback] The command result callback
1018
1018
* @return {Promise } returns Promise if no callback passed
@@ -1199,7 +1199,7 @@ Collection.prototype.isCapped = function(options, callback) {
1199
1199
* @param {(number|string) } [options.w] DEPRECATED: The write concern. Use writeConcern instead.
1200
1200
* @param {number } [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
1201
1201
* @param {boolean } [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
1202
- * @param {object } [options.writeConcern] Specify write concern settings.
1202
+ * @param {object|WriteConcern } [options.writeConcern] Specify write concern settings.
1203
1203
* @param {boolean } [options.unique=false] Creates an unique index.
1204
1204
* @param {boolean } [options.sparse=false] Creates a sparse index.
1205
1205
* @param {boolean } [options.background=false] Creates the index in the background, yielding whenever possible.
@@ -1313,7 +1313,7 @@ Collection.prototype.createIndexes = function(indexSpecs, options, callback) {
1313
1313
* @param {(number|string) } [options.w] DEPRECATED: The write concern. Use writeConcern instead.
1314
1314
* @param {number } [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
1315
1315
* @param {boolean } [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
1316
- * @param {object } [options.writeConcern] Specify write concern settings.
1316
+ * @param {object|WriteConcern } [options.writeConcern] Specify write concern settings.
1317
1317
* @param {ClientSession } [options.session] optional session to use for this operation
1318
1318
* @param {number } [options.maxTimeMS] Number of milliseconds to wait before aborting the query.
1319
1319
* @param {Collection~resultCallback } [callback] The command result callback
@@ -1412,7 +1412,7 @@ Collection.prototype.listIndexes = function(options) {
1412
1412
* @param {(number|string) } [options.w] DEPRECATED: The write concern. Use writeConcern instead.
1413
1413
* @param {number } [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
1414
1414
* @param {boolean } [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
1415
- * @param {object } [options.writeConcern] Specify write concern settings.
1415
+ * @param {object|WriteConcern } [options.writeConcern] Specify write concern settings.
1416
1416
* @param {boolean } [options.unique=false] Creates an unique index.
1417
1417
* @param {boolean } [options.sparse=false] Creates a sparse index.
1418
1418
* @param {boolean } [options.background=false] Creates the index in the background, yielding whenever possible.
@@ -1766,7 +1766,7 @@ Collection.prototype.findOneAndUpdate = function(filter, update, options, callba
1766
1766
* @param {(number|string) } [options.w] DEPRECATED: The write concern. Use writeConcern instead.
1767
1767
* @param {number } [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
1768
1768
* @param {boolean } [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
1769
- * @param {object } [options.writeConcern] Specify write concern settings.
1769
+ * @param {object|WriteConcern } [options.writeConcern] Specify write concern settings.
1770
1770
* @param {boolean } [options.remove=false] Set to true to remove the object before returning.
1771
1771
* @param {boolean } [options.upsert=false] Perform an upsert operation.
1772
1772
* @param {boolean } [options.new=false] Set to true if you want to return the modified object rather than the original. Ignored for remove.
@@ -1817,7 +1817,7 @@ function _findAndModify(query, sort, doc, options, callback) {
1817
1817
* @param {(number|string) } [options.w] DEPRECATED: The write concern. Use writeConcern instead.
1818
1818
* @param {number } [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
1819
1819
* @param {boolean } [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
1820
- * @param {object } [options.writeConcern] Specify write concern settings.
1820
+ * @param {object|WriteConcern } [options.writeConcern] Specify write concern settings.
1821
1821
* @param {ClientSession } [options.session] optional session to use for this operation
1822
1822
* @param {Collection~resultCallback } [callback] The command result callback
1823
1823
* @return {Promise } returns Promise if no callback passed
@@ -2144,7 +2144,7 @@ Collection.prototype.mapReduce = function(map, reduce, options, callback) {
2144
2144
* @param {(number|string) } [options.w] DEPRECATED: The write concern. Use writeConcern instead.
2145
2145
* @param {number } [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
2146
2146
* @param {boolean } [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
2147
- * @param {object } [options.writeConcern] Specify write concern settings.
2147
+ * @param {object|WriteConcern } [options.writeConcern] Specify write concern settings.
2148
2148
* @param {boolean } [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
2149
2149
* @param {ClientSession } [options.session] optional session to use for this operation
2150
2150
* @return {UnorderedBulkOperation }
@@ -2168,7 +2168,7 @@ Collection.prototype.initializeUnorderedBulkOp = function(options) {
2168
2168
* @param {(number|string) } [options.w] DEPRECATED: The write concern. Use writeConcern instead.
2169
2169
* @param {number } [options.wtimeout] DEPRECATED: The write concern timeout. Use writeConcern instead.
2170
2170
* @param {boolean } [options.j=false] DEPRECATED: Specify a journal write concern. Use writeConcern instead.
2171
- * @param {object } [options.writeConcern] Specify write concern settings.
2171
+ * @param {object|WriteConcern } [options.writeConcern] Specify write concern settings.
2172
2172
* @param {ClientSession } [options.session] optional session to use for this operation
2173
2173
* @param {boolean } [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
2174
2174
* @param {OrderedBulkOperation } callback The command result callback
0 commit comments