From d47edadb76a5ca0548de21ecae79b948db697559 Mon Sep 17 00:00:00 2001 From: Bastien Arata Date: Thu, 28 Jun 2018 17:10:41 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20set=20property=20optional?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/mongodb/index.d.ts | 2 +- types/mongodb/mongodb-tests.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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;