Skip to content

Commit 77112b6

Browse files
Apply suggestions from code review
Co-authored-by: Daria Pardue <[email protected]>
1 parent 6266ba0 commit 77112b6

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

etc/notes/CHANGES_5.0.0.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The following is a detailed collection of the changes in the major v5 release of
1818

1919
### Dot Notation Typescript Support Removed By Default
2020

21-
**NOTE** This is a **Typescript compile-time only** change. Dot notation in filters sent to MongoDB still work the same.
21+
**NOTE** This is a **Typescript compile-time only** change. Dot notation in filters sent to MongoDB will still work the same.
2222

2323
Version 4.3.0 introduced Typescript support for dot notation in filter predicates. For example:
2424

@@ -34,15 +34,17 @@ declare const collection: Collection<Schema>;
3434
collection.find({ 'user.name': 4 })
3535
```
3636

37-
This change caused many problems for users, including slow compilation times and compile errors for
38-
valid dot notation queries.
37+
This change caused a number of problems for users, including slow compilation times and compile errors for
38+
valid dot notation queries. While we have tried to mitigate this issue as much as possible
39+
in v4, ultimately we do not believe that this feature is fully production ready for all use cases.
3940

4041
Driver 5.0 removes type checking on filter predicates. The preceding example will compile with
4142
driver v5.
4243

4344
#### Dot Notation Helper Types Exported
4445

45-
Although we removed support for type checking on dot notation filters by default, we now export these types.
46+
Although we removed support for type checking on dot notation filters by default, we have preserved the
47+
corresponding types in an experimental capacity.
4648
These helper types can be used for type checking. We export the `StrictUpdateFilter` and the `StrictFilter`
4749
types for type safety in updates and finds.
4850

@@ -61,7 +63,7 @@ const filterPredicate: StrictFilter<Schema> = { 'user.name': 4 };
6163
collection.find(filterPredicate);
6264
```
6365

64-
**NOTE** These types are also now marked experimental and can be changed at any time.
66+
**NOTE** As an experimental feature, these types can change at any time and are not recommended for production settings.
6567

6668
### `Collection.mapReduce()` helper removed
6769

0 commit comments

Comments
 (0)