We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5f44796 + 3884f41 commit ac0c086Copy full SHA for ac0c086
test/types/aggregate.test.ts
@@ -152,3 +152,10 @@ function gh13060() {
152
}
153
}]);
154
155
+
156
+async function gh15300() {
157
+ const schema = new Schema({ status: String });
158
+ const TestModel = model('Document', schema);
159
160
+ await TestModel.aggregate().project('a b -_id');
161
+}
types/aggregate.d.ts
@@ -124,7 +124,7 @@ declare module 'mongoose' {
124
pipeline(): PipelineStage[];
125
126
/** Appends a new $project operator to this aggregate pipeline. */
127
- project(arg: PipelineStage.Project['$project']): this;
+ project(arg: PipelineStage.Project['$project'] | string): this;
128
129
/** Sets the readPreference option for the aggregation query. */
130
read(pref: mongodb.ReadPreferenceLike): this;
0 commit comments