diff --git a/types/mongoose/index.d.ts b/types/mongoose/index.d.ts index 0c46add635..76678a82bc 100644 --- a/types/mongoose/index.d.ts +++ b/types/mongoose/index.d.ts @@ -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 // 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; diff --git a/types/mongoose/mongoose-tests.ts b/types/mongoose/mongoose-tests.ts index 796ae086e3..0188d0893a 100644 --- a/types/mongoose/mongoose-tests.ts +++ b/types/mongoose/mongoose-tests.ts @@ -28,7 +28,8 @@ const connection2: Promise = mongoose.connect(connectUri, { autoIndex: true }, mongos: true, - bufferCommands: false + bufferCommands: false, + useNewUrlParser: true }); const connection3: null = mongoose.connect(connectUri, function (error) { error.stack;