Skip to content

Commit 48f295a

Browse files
authored
feat(NODE-4548): export ChangeStream class from top-level (#3357)
1 parent 40d485c commit 48f295a

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/collection.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,13 +1610,13 @@ export class Collection<TSchema extends Document = Document> {
16101610
* Updates documents.
16111611
*
16121612
* @deprecated use updateOne, updateMany or bulkWrite
1613-
* @param selector - The selector for the update operation.
1613+
* @param filter - The filter for the update operation.
16141614
* @param update - The update operations to be applied to the documents
16151615
* @param options - Optional settings for the command
16161616
* @param callback - An optional callback, a Promise will be returned if none is provided
16171617
*/
16181618
update(
1619-
selector: Filter<TSchema>,
1619+
filter: Filter<TSchema>,
16201620
update: UpdateFilter<TSchema>,
16211621
options: UpdateOptions,
16221622
callback: Callback<Document>
@@ -1627,19 +1627,19 @@ export class Collection<TSchema extends Document = Document> {
16271627
if (typeof options === 'function') (callback = options), (options = {});
16281628
options = options ?? {};
16291629

1630-
return this.updateMany(selector, update, options, callback);
1630+
return this.updateMany(filter, update, options, callback);
16311631
}
16321632

16331633
/**
16341634
* Remove documents.
16351635
*
16361636
* @deprecated use deleteOne, deleteMany or bulkWrite
1637-
* @param selector - The selector for the update operation.
1637+
* @param filter - The filter for the remove operation.
16381638
* @param options - Optional settings for the command
16391639
* @param callback - An optional callback, a Promise will be returned if none is provided
16401640
*/
16411641
remove(
1642-
selector: Filter<TSchema>,
1642+
filter: Filter<TSchema>,
16431643
options: DeleteOptions,
16441644
callback: Callback
16451645
): Promise<DeleteResult> | void {
@@ -1649,7 +1649,7 @@ export class Collection<TSchema extends Document = Document> {
16491649
if (typeof options === 'function') (callback = options), (options = {});
16501650
options = options ?? {};
16511651

1652-
return this.deleteMany(selector, options, callback);
1652+
return this.deleteMany(filter, options, callback);
16531653
}
16541654

16551655
/**

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Admin } from './admin';
22
import { ObjectId } from './bson';
3+
import { ChangeStream } from './change_stream';
34
import { Collection } from './collection';
45
import { AbstractCursor } from './cursor/abstract_cursor';
56
import { AggregationCursor } from './cursor/aggregation_cursor';
@@ -78,6 +79,7 @@ export {
7879
Admin,
7980
AggregationCursor,
8081
CancellationToken,
82+
ChangeStream,
8183
Collection,
8284
Db,
8385
FindCursor,
@@ -172,7 +174,6 @@ export type {
172174
export type { OrderedBulkOperation } from './bulk/ordered';
173175
export type { UnorderedBulkOperation } from './bulk/unordered';
174176
export type {
175-
ChangeStream,
176177
ChangeStreamCollModDocument,
177178
ChangeStreamCreateDocument,
178179
ChangeStreamCreateIndexDocument,

0 commit comments

Comments
 (0)