diff --git a/types/mongodb/index.d.ts b/types/mongodb/index.d.ts index 198a308f18..f8aa0e15c3 100644 --- a/types/mongodb/index.d.ts +++ b/types/mongodb/index.d.ts @@ -105,7 +105,7 @@ export interface MongoClientOptions extends password: string; }, // Determines whether or not to use the new url parser - useNewUrlParser: boolean + useNewUrlParser?: boolean } export interface SSLOptions { diff --git a/types/mongodb/mongodb-tests.ts b/types/mongodb/mongodb-tests.ts index a5a27bd671..0b9c2d0edc 100644 --- a/types/mongodb/mongodb-tests.ts +++ b/types/mongodb/mongodb-tests.ts @@ -27,7 +27,8 @@ let options: mongodb.MongoClientOptions = { sslCert: new Buffer(999), sslKey: new Buffer(999), sslPass: new Buffer(999), - promoteBuffers: false + promoteBuffers: false, + useNewUrlParser: false } MongoClient.connect('mongodb://127.0.0.1:27017/test', options, function (err: mongodb.MongoError, client: mongodb.MongoClient) { if (err) throw err;