diff --git a/src/collection.ts b/src/collection.ts index 7cfb5e41cf..3f142e7f40 100644 --- a/src/collection.ts +++ b/src/collection.ts @@ -1610,13 +1610,13 @@ export class Collection { * Updates documents. * * @deprecated use updateOne, updateMany or bulkWrite - * @param selector - The selector for the update operation. + * @param filter - The filter for the update operation. * @param update - The update operations to be applied to the documents * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ update( - selector: Filter, + filter: Filter, update: UpdateFilter, options: UpdateOptions, callback: Callback @@ -1627,19 +1627,19 @@ export class Collection { if (typeof options === 'function') (callback = options), (options = {}); options = options ?? {}; - return this.updateMany(selector, update, options, callback); + return this.updateMany(filter, update, options, callback); } /** * Remove documents. * * @deprecated use deleteOne, deleteMany or bulkWrite - * @param selector - The selector for the update operation. + * @param filter - The filter for the remove operation. * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ remove( - selector: Filter, + filter: Filter, options: DeleteOptions, callback: Callback ): Promise | void { @@ -1649,7 +1649,7 @@ export class Collection { if (typeof options === 'function') (callback = options), (options = {}); options = options ?? {}; - return this.deleteMany(selector, options, callback); + return this.deleteMany(filter, options, callback); } /** diff --git a/src/index.ts b/src/index.ts index f637088467..5dc5ab735e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,6 @@ import { Admin } from './admin'; import { ObjectId } from './bson'; +import { ChangeStream } from './change_stream'; import { Collection } from './collection'; import { AbstractCursor } from './cursor/abstract_cursor'; import { AggregationCursor } from './cursor/aggregation_cursor'; @@ -76,6 +77,7 @@ export { Admin, AggregationCursor, CancellationToken, + ChangeStream, Collection, Db, FindCursor, @@ -170,7 +172,6 @@ export type { export type { OrderedBulkOperation } from './bulk/ordered'; export type { UnorderedBulkOperation } from './bulk/unordered'; export type { - ChangeStream, ChangeStreamCollModDocument, ChangeStreamCreateDocument, ChangeStreamCreateIndexDocument,