mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[mongodb] MongoError constructor accept string and object (#43383)
* MongoError constructor accept string and object * Re-run CI * Add Error as accepted types for MongoError constructor * Re-run CI
This commit is contained in:
parent
7621f3b99c
commit
cc70df9691
4
types/mongodb/index.d.ts
vendored
4
types/mongodb/index.d.ts
vendored
@ -230,11 +230,11 @@ export type WithTransactionCallback<T> = (session: ClientSession) => Promise<T>;
|
||||
* see {@link http://mongodb.github.io/node-mongodb-native/3.5/api/MongoError.html}
|
||||
*/
|
||||
export class MongoError extends Error {
|
||||
constructor(message: string);
|
||||
constructor(message: string | Error | object);
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
static create(options: string): MongoError;
|
||||
static create(options: string | Error | object): MongoError;
|
||||
/**
|
||||
* Checks the error to see if it has an error label
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user