From 950c9cdca99ccc97dd09cb05609da679063584c5 Mon Sep 17 00:00:00 2001 From: beeme1mr Date: Mon, 1 May 2017 16:49:14 -0400 Subject: [PATCH] Added a code property to MongoError (#16242) Added missing code property to MongoError. http://thecodebarbarian.com/mongoose-error-handling --- types/mongodb/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/mongodb/index.d.ts b/types/mongodb/index.d.ts index 4c4106c7a6..5fe6332350 100644 --- a/types/mongodb/index.d.ts +++ b/types/mongodb/index.d.ts @@ -35,6 +35,7 @@ export interface MongoCallback { export class MongoError extends Error { constructor(message: string); static create(options: Object): MongoError; + code?: number; } //http://mongodb.github.io/node-mongodb-native/2.1/api/MongoClient.html#.connect