Added a code property to MongoError (#16242)

Added missing code property to MongoError.

http://thecodebarbarian.com/mongoose-error-handling
This commit is contained in:
beeme1mr 2017-05-01 16:49:14 -04:00 committed by Mohamed Hegazy
parent be0d3f97cb
commit 950c9cdca9

View File

@ -35,6 +35,7 @@ export interface MongoCallback<T> {
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