mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-02 06:29:40 +08:00
open() is deprecated in mongoose >= 4.11.0
Breaking change in @Automattic/mongoose
dda165eebd (diff-259dec4414a400a6e895f16ff1d0ca3b)
This commit is contained in:
committed by
GitHub
parent
8cd6bba3b3
commit
1762c042d8
14
types/mongoose/index.d.ts
vendored
14
types/mongoose/index.d.ts
vendored
@@ -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