Skip to content

Commit 876df2c

Browse files
committed
docs(NODE-6765): update comments for findOneAndUpdate
1 parent 45233da commit 876df2c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/collection.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,8 +966,12 @@ export class Collection<TSchema extends Document = Document> {
966966
/**
967967
* Find a document and update it in one atomic operation. Requires a write lock for the duration of the operation.
968968
*
969+
* The value of `update` can be either:
970+
* - UpdateFilter<TSchema> - A document that contains update operator expressions,
971+
* - Document[] - an aggregation pipeline.
972+
*
969973
* @param filter - The filter used to select the document to update
970-
* @param update - Update operations to be performed on the document
974+
* @param update - The modifications to apply
971975
* @param options - Optional settings for the command
972976
*/
973977
async findOneAndUpdate(

0 commit comments

Comments
 (0)