We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d997df commit 071e0b1Copy full SHA for 071e0b1
test/types/queries.test.ts
@@ -844,4 +844,10 @@ async function gh15779() {
844
845
expectAssignable<typeof v8Filter.age>(42);
846
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);
853
}
0 commit comments