[@types/mongoose] Added flag for useNewUrlParser in ConnectionOptions (#27050)

* feat(mongoose): Added flag for new url parser

* feat(mongoose): added test for useNewUrlParser flag

* feat(mongoose): bumped up mongoose version
This commit is contained in:
Galymzhan Abdugalimov
2018-07-05 09:57:16 -07:00
committed by Mohamed Hegazy
parent 63be35d54a
commit dae079e5be
2 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -1,4 +1,4 @@
// Type definitions for Mongoose 5.0.15
// Type definitions for Mongoose 5.2.1
// Project: http://mongoosejs.com/
// Definitions by: horiuchi <https://github.com/horiuchi>
// sindrenm <https://github.com/sindrenm>
@@ -376,6 +376,9 @@ declare module "mongoose" {
/** Passed directly through to tls.createSecureContext. See https://nodejs.org/dist/latest-v9.x/docs/api/tls.html#tls_tls_createsecurecontext_options for more info. */
ciphers?: string;
ecdhCurve?: string;
/** Flag for using new URL string parser instead of current (deprecated) one */
useNewUrlParser?: boolean;
// TODO
safe?: any;
+2 -1
View File
@@ -28,7 +28,8 @@ const connection2: Promise<mongoose.Mongoose> = mongoose.connect(connectUri, {
autoIndex: true
},
mongos: true,
bufferCommands: false
bufferCommands: false,
useNewUrlParser: true
});
const connection3: null = mongoose.connect(connectUri, function (error) {
error.stack;