From 7f7123902e51539035145d19375ccb6c44b466af Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Wed, 30 Mar 2022 13:47:43 -0400 Subject: [PATCH] fix: add constraints to client and collection --- src/collection.ts | 2 +- src/mongo_client.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/collection.ts b/src/collection.ts index 002d3335d9..0f45359543 100644 --- a/src/collection.ts +++ b/src/collection.ts @@ -1422,7 +1422,7 @@ export class Collection { * @param pipeline - An array of {@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline/|aggregation pipeline stages} through which to pass change stream documents. This allows for filtering (using $match) and manipulating the change stream documents. * @param options - Optional settings for the command */ - watch( + watch( pipeline: Document[] = [], options: ChangeStreamOptions = {} ): ChangeStream { diff --git a/src/mongo_client.ts b/src/mongo_client.ts index 90e4fc2188..6a8af89204 100644 --- a/src/mongo_client.ts +++ b/src/mongo_client.ts @@ -590,7 +590,7 @@ export class MongoClient extends TypedEventEmitter { * @param pipeline - An array of {@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline/|aggregation pipeline stages} through which to pass change stream documents. This allows for filtering (using $match) and manipulating the change stream documents. * @param options - Optional settings for the command */ - watch( + watch( pipeline: Document[] = [], options: ChangeStreamOptions = {} ): ChangeStream {