Skip to content

Commit

Permalink
style(document): remove some more jsdoc "callback" references
Browse files Browse the repository at this point in the history
  • Loading branch information
hasezoey committed Dec 14, 2024
1 parent 2080511 commit 6874338
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ function init(self, obj, doc, opts, prefix) {
*
* #### Example:
*
* weirdCar.updateOne({$inc: {wheels:1}}, { w: 1 }, callback);
* weirdCar.updateOne({$inc: {wheels:1}}, { w: 1 });
*
* #### Valid options:
*
Expand All @@ -843,7 +843,6 @@ function init(self, obj, doc, opts, prefix) {
* @param {Object} [options.lean] if truthy, mongoose will return the document as a plain JavaScript object rather than a mongoose document. See [`Query.lean()`](https://mongoosejs.com/docs/api/query.html#Query.prototype.lean()) and the [Mongoose lean tutorial](https://mongoosejs.com/docs/tutorials/lean.html).
* @param {Boolean|String} [options.strict] overwrites the schema's [strict mode option](https://mongoosejs.com/docs/guide.html#strict)
* @param {Boolean} [options.timestamps=null] If set to `false` and [schema-level timestamps](https://mongoosejs.com/docs/guide.html#timestamps) are enabled, skip timestamps for this update. Note that this allows you to overwrite timestamps. Does nothing if schema-level timestamps are not set.
* @param {Function} [callback]
* @return {Query}
* @api public
* @memberOf Document
Expand Down Expand Up @@ -3439,12 +3438,11 @@ function _checkImmutableSubpaths(subdoc, schematype, priorVal) {
* @param {Number} [options.wtimeout] sets a [timeout for the write concern](https://www.mongodb.com/docs/manual/reference/write-concern/#wtimeout). Overrides the [schema-level `writeConcern` option](https://mongoosejs.com/docs/guide.html#writeConcern).
* @param {Boolean} [options.checkKeys=true] the MongoDB driver prevents you from saving keys that start with '$' or contain '.' by default. Set this option to `false` to skip that check. See [restrictions on field names](https://www.mongodb.com/docs/manual/reference/limits/#Restrictions-on-Field-Names)
* @param {Boolean} [options.timestamps=true] if `false` and [timestamps](https://mongoosejs.com/docs/guide.html#timestamps) are enabled, skip timestamps for this `save()`.
* @param {Function} [fn] optional callback
* @method save
* @memberOf Document
* @instance
* @throws {DocumentNotFoundError} if this [save updates an existing document](https://mongoosejs.com/docs/api/document.html#Document.prototype.isNew()) but the document doesn't exist in the database. For example, you will get this error if the document is [deleted between when you retrieved the document and when you saved it](documents.html#updating).
* @return {Promise|undefined} Returns undefined if used with callback or a Promise otherwise.
* @return {Promise}
* @api public
* @see middleware https://mongoosejs.com/docs/middleware.html
*/
Expand Down

0 comments on commit 6874338

Please sign in to comment.