Closed
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Mongoose version
8.10.1
Node.js version
20
MongoDB server version
4.4
Typescript version (if applicable)
5.7.3
Description
project
stage doesn't accept string as in the doc:
// include a, include b, exclude _id
aggregate.project("a b -_id");
Typescript error:
Argument of type 'string' is not assignable to parameter of type '{ [field: string]: any; }'.ts(2345)
I think string |
is missing in
mongoose/types/pipelinestage.d.ts
Lines 211 to 214 in 633ff8d
Steps to Reproduce
Pass a string argument to the project
stage
Expected Behavior
Should not show a Typescript error
Metadata
Metadata
Assignees
Labels
No labels