Skip to content

Commit

Permalink
fix: add constraints to client and collection
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken committed Mar 30, 2022
1 parent 4b73433 commit 7f71239
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/collection.ts
Expand Up @@ -1422,7 +1422,7 @@ export class Collection<TSchema extends Document = Document> {
* @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<TLocal = TSchema>(
watch<TLocal extends Document = TSchema>(
pipeline: Document[] = [],
options: ChangeStreamOptions = {}
): ChangeStream<TLocal> {
Expand Down
2 changes: 1 addition & 1 deletion src/mongo_client.ts
Expand Up @@ -590,7 +590,7 @@ export class MongoClient extends TypedEventEmitter<MongoClientEvents> {
* @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 7f71239

Please sign in to comment.