mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 14:27:04 +00:00
[@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:
committed by
Mohamed Hegazy
parent
63be35d54a
commit
dae079e5be
Vendored
+4
-1
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user