-
Type:
New Feature
-
Resolution: Won't Fix
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: TypeScript
How are you using Mongo? What version of the server and driver are you using?
Using https://github.com/mongodb/node-mongodb-native through typescript
What is the feauture/improvement you would like?
The signature for `FindCursor<TSchema = Document>` `project` is
```
project<T extends Document = Document>(value: Document): FindCursor<T>;
```
I think this should be
```
project<T extends TSchema>(value: Toggle<T>): FindCursor<T>;
```
where `Toggle<T> = {[keyof T]: 0 | 1}` has the right values.
What use case would this feature/improvement enable?
Better type safety for projections.
- depends on
-
NODE-3842 Investigate NODE-3841 - Typescript cursor projection should be strongly typed
-
- Closed
-