mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
open() is deprecated in mongoose >= 4.11.0
Breaking change in @Automattic/mongoose https://github.com/Automattic/mongoose/commit/dda165eebdb241397e9990440dc8e9c1f733db76#diff-259dec4414a400a6e895f16ff1d0ca3b
This commit is contained in:
Vendored
+14
@@ -190,6 +190,7 @@ declare module "mongoose" {
|
||||
|
||||
/**
|
||||
* Opens the connection to MongoDB.
|
||||
* @deprecated open() is deprecated in mongoose >= 4.11.0
|
||||
* @param mongodb://uri or the host to which you are connecting
|
||||
* @param database database name
|
||||
* @param port database port
|
||||
@@ -200,6 +201,19 @@ declare module "mongoose" {
|
||||
*/
|
||||
open(connection_string: string, database?: string, port?: number,
|
||||
options?: ConnectionOpenOptions, callback?: (err: any) => void): any;
|
||||
|
||||
/**
|
||||
* Opens the connection to MongoDB.
|
||||
* @param mongodb://uri or the host to which you are connecting
|
||||
* @param database database name
|
||||
* @param port database port
|
||||
* @param options Mongoose forces the db option forceServerObjectId false and cannot be overridden.
|
||||
* Mongoose defaults the server auto_reconnect options to true which can be overridden.
|
||||
* See the node-mongodb-native driver instance for options that it understands.
|
||||
* Options passed take precedence over options included in connection strings.
|
||||
*/
|
||||
openUri(connection_string: string, database?: string, port?: number,
|
||||
options?: ConnectionOpenOptions, callback?: (err: any) => void): any;
|
||||
|
||||
/** Helper for dropDatabase() */
|
||||
dropDatabase(callback?: (err: any) => void): Promise<any>;
|
||||
|
||||
Reference in New Issue
Block a user