Skip to content

Commit 4b73433

Browse files
committed
fix: Constrain watch type parameter to extend ChangeStream type parameter
1 parent 5132bc9 commit 4b73433

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/db.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ export class Db {
722722
* @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.
723723
* @param options - Optional settings for the command
724724
*/
725-
watch<TSchema = Document>(
725+
watch<TSchema extends Document = Document>(
726726
pipeline: Document[] = [],
727727
options: ChangeStreamOptions = {}
728728
): ChangeStream<TSchema> {

0 commit comments

Comments
 (0)