Skip to content

Commit

Permalink
fix: Constrain watch type parameter to extend ChangeStream type p…
Browse files Browse the repository at this point in the history
…arameter
  • Loading branch information
eps1lon committed Mar 29, 2022
1 parent 5132bc9 commit 4b73433
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ export class Db {
* @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<TSchema = Document>(
watch<TSchema extends Document = Document>(
pipeline: Document[] = [],
options: ChangeStreamOptions = {}
): ChangeStream<TSchema> {
Expand Down

0 comments on commit 4b73433

Please sign in to comment.