Merge pull request #31232 from tiant167/master

[@types/mongoose] add autoIndex at top level of connection options
This commit is contained in:
Jesse Trinity
2018-12-12 18:19:59 -08:00
committed by GitHub
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -424,6 +424,7 @@ declare module "mongoose" {
*/
autoIndex?: boolean;
};
autoIndex?: boolean;
}
/** See the node-mongodb-native driver instance for options that it understands. */
+2 -1
View File
@@ -27,7 +27,8 @@ const connection2: Promise<mongoose.Mongoose> = mongoose.connect(connectUri, {
bufferCommands: false,
useNewUrlParser: true,
useFindAndModify: true,
useCreateIndex: true
useCreateIndex: true,
autoIndex: true
});
const connection3: null = mongoose.connect(connectUri, function (error) {
error.stack;