Skip to content

Commit ac0c086

Browse files
committed
Merge branch '7.x'
2 parents 5f44796 + 3884f41 commit ac0c086

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

test/types/aggregate.test.ts

+7
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,10 @@ function gh13060() {
152152
}
153153
}]);
154154
}
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ declare module 'mongoose' {
124124
pipeline(): PipelineStage[];
125125

126126
/** Appends a new $project operator to this aggregate pipeline. */
127-
project(arg: PipelineStage.Project['$project']): this;
127+
project(arg: PipelineStage.Project['$project'] | string): this;
128128

129129
/** Sets the readPreference option for the aggregation query. */
130130
read(pref: mongodb.ReadPreferenceLike): this;

0 commit comments

Comments
 (0)