From 6b6db76b81dcbd2da7366f8e056a0793183c53e7 Mon Sep 17 00:00:00 2001 From: "Mariano A. Cortesi" Date: Mon, 13 Nov 2017 13:19:54 -0300 Subject: [PATCH] [mongodb] Include `bufferMaxEntries` as a MongoClientOption --- types/mongodb/index.d.ts | 4 ++++ types/mongodb/mongodb-tests.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/types/mongodb/index.d.ts b/types/mongodb/index.d.ts index 19cf0136e2..32bc523d38 100644 --- a/types/mongodb/index.d.ts +++ b/types/mongodb/index.d.ts @@ -5,6 +5,7 @@ // Gady Piazza // Jason Dreyzehner // Gaurav Lahoti +// Mariano Cortesi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -146,6 +147,9 @@ export interface DbCreateOptions { promiseLibrary?: Object; // https://docs.mongodb.com/manual/reference/read-concern/#read-concern readConcern?: { level?: Object }; + // Sets a cap on how many operations the driver will buffer up before giving up on getting a + // working connection, default is -1 which is unlimited. + bufferMaxEntries?: number; } // http://mongodb.github.io/node-mongodb-native/2.2/api/Server.html diff --git a/types/mongodb/mongodb-tests.ts b/types/mongodb/mongodb-tests.ts index 2b8c49d186..52f2d6e4f8 100644 --- a/types/mongodb/mongodb-tests.ts +++ b/types/mongodb/mongodb-tests.ts @@ -3,7 +3,7 @@ import mongodb = require('mongodb'); var MongoClient = mongodb.MongoClient; var format = require('util').format; -let options = { +let options: mongodb.MongoClientOptions = { authSource : ' ', w : 1, wtimeout : 300,