Skip to content

Commit 071e0b1

Browse files
committed
add test requested in CR comments
1 parent 6d997df commit 071e0b1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/types/queries.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,4 +844,10 @@ async function gh15779() {
844844

845845
expectAssignable<typeof v8Filter.age>(42);
846846
expectNotAssignable<typeof v8Filter.age>('taco');
847+
848+
const TestModel = model('Test', new Schema({ age: Number, name: String }));
849+
const query = TestModel.find({ age: { $gt: 18 } });
850+
TestModel.find(query); // Should compile without errors
851+
TestModel.findOne(query);
852+
TestModel.deleteMany(query);
847853
}

0 commit comments

Comments
 (0)