diff --git a/types/mongodb/index.d.ts b/types/mongodb/index.d.ts index d834e7cb4d..e114581006 100644 --- a/types/mongodb/index.d.ts +++ b/types/mongodb/index.d.ts @@ -230,11 +230,11 @@ export type WithTransactionCallback = (session: ClientSession) => Promise; * 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 */