🔧 set property optional

This commit is contained in:
Bastien Arata
2018-06-28 17:10:41 +02:00
parent 3e31f0623d
commit d47edadb76
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -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 {
+2 -1
View File
@@ -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;