diff --git a/types/mongodb/mongodb-tests.ts b/types/mongodb/mongodb-tests.ts index 36428d786f..852522aadc 100644 --- a/types/mongodb/mongodb-tests.ts +++ b/types/mongodb/mongodb-tests.ts @@ -98,4 +98,19 @@ MongoClient.connect('mongodb://127.0.0.1:27017/test', options, function (err: mo type payment = typeof payment; let cursor: mongodb.AggregationCursor = collection.aggregate([{}]) } + + // test for new typings + { + type TestCollection = { + stringField: string; + numberField: number; + }; + let testCollection = db.collection('testCollection'); + + testCollection.find({ + numberField: { + $and: [{ $gt: 0, $lt: 100 }] + } + }); + } })