done-callback supports a optional error parameter

This commit is contained in:
Kanibal
2017-09-22 02:55:02 +02:00
parent 78d81429f4
commit e30f58fda5
+1 -1
View File
@@ -628,7 +628,7 @@ declare module "mongoose" {
/**
* Defines a pre hook for the document.
*/
pre(method: string, parallel: boolean, fn: (next: (err?: NativeError) => void, done: () => void) => void,
pre(method: string, parallel: boolean, fn: (next: (err?: NativeError) => void, done: (err?: NativeError) => void) => void,
errorCb?: (err: Error) => void): this;
pre(method: string, fn: (next: (err?: NativeError) => void) => void,
errorCb?: (err: Error) => void): this;