mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
[mongoose] Add useUnifiedTopology to ConnectionOptions (#41329)
* Add useUnifiedTopology to ConnectionOptions useUnifiedTopology is the flag for using the new Server Discovery and Monitoring engine instead of current (deprecated) one. * Update the tests to include useUnifiedTopology
This commit is contained in:
Vendored
+2
@@ -371,6 +371,8 @@ declare module "mongoose" {
|
||||
useNewUrlParser?: boolean;
|
||||
/** Set to false to make findOneAndUpdate() and findOneAndRemove() use native findOneAndUpdate() rather than findAndModify(). */
|
||||
useFindAndModify?: boolean;
|
||||
/** Flag for using new Server Discovery and Monitoring engine instead of current (deprecated) one */
|
||||
useUnifiedTopology?: boolean;
|
||||
|
||||
// Legacy properties - passed to the connection server instance(s)
|
||||
mongos?: any;
|
||||
|
||||
@@ -27,6 +27,7 @@ const connection2: Promise<mongoose.Mongoose> = mongoose.connect(connectUri, {
|
||||
bufferCommands: false,
|
||||
useNewUrlParser: true,
|
||||
useFindAndModify: true,
|
||||
useUnifiedTopology: true,
|
||||
useCreateIndex: true,
|
||||
autoIndex: true,
|
||||
autoCreate: true,
|
||||
|
||||
Reference in New Issue
Block a user