mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #29863 from NormanPerrin/master
mongoose: change useCreateIndex position in connect option obj
This commit is contained in:
Vendored
+4
-6
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Mongoose 5.2.13
|
||||
// Type definitions for Mongoose 5.3.4
|
||||
// Project: http://mongoosejs.com/
|
||||
// Definitions by: horiuchi <https://github.com/horiuchi>
|
||||
// sindrenm <https://github.com/sindrenm>
|
||||
@@ -13,6 +13,7 @@
|
||||
// Idan Dardikman <https://github.com/idandrd>
|
||||
// Dominik Heigl <https://github.com/various89>
|
||||
// Fazendaaa <https://github.com/Fazendaaa>
|
||||
// Norman Perrin <https://github.com/NormanPerrin>
|
||||
// Dan Manastireanu <https://github.com/danmana>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
@@ -391,6 +392,8 @@ declare module "mongoose" {
|
||||
useNewUrlParser?: boolean;
|
||||
/** Set to false to make findOneAndUpdate() and findOneAndRemove() use native findOneAndUpdate() rather than findAndModify(). */
|
||||
useFindAndModify?: boolean;
|
||||
/** If true, this connection will use createIndex() instead of ensureIndex() for automatic index builds via Model.init(). */
|
||||
useCreateIndex?: boolean;
|
||||
|
||||
// TODO
|
||||
safe?: any;
|
||||
@@ -409,11 +412,6 @@ declare module "mongoose" {
|
||||
* models associated with this connection.
|
||||
*/
|
||||
autoIndex?: boolean;
|
||||
|
||||
/**
|
||||
* If true, this connection will use createIndex() instead of ensureIndex() for automatic index builds via Model.init().
|
||||
*/
|
||||
useCreateIndex?: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -22,12 +22,12 @@ const connection2: Promise<mongoose.Mongoose> = mongoose.connect(connectUri, {
|
||||
pass: 'housan',
|
||||
config: {
|
||||
autoIndex: true,
|
||||
useCreateIndex: true,
|
||||
},
|
||||
mongos: true,
|
||||
bufferCommands: false,
|
||||
useNewUrlParser: true,
|
||||
useFindAndModify: true,
|
||||
useCreateIndex: true
|
||||
});
|
||||
const connection3: null = mongoose.connect(connectUri, function (error) {
|
||||
error.stack;
|
||||
|
||||
Reference in New Issue
Block a user