merge overloads for errorCb

This commit is contained in:
frogcjn
2016-06-24 11:09:55 +08:00
parent 8d88700601
commit cb77aeaff2
+4 -8
View File
@@ -274,14 +274,10 @@ declare module "mongoose" {
pathType(path: string): string;
plugin(plugin: (schema: Schema, options?: Object) => void, options?: Object): Schema;
pre(method: string, fn: HookSyncCallback): Schema;
pre(method: string, fn: HookSyncCallback, errorCb: HookErrorCallback): Schema;
pre(method: string, isAsync: boolean, fn: HookAsyncCallback): Schema;
pre(method: string, isAsync: boolean, fn: HookAsyncCallback, errorCb: HookErrorCallback): Schema;
post(method: string, fn: HookSyncCallback): Schema;
post(method: string, fn: HookSyncCallback, errorCb: HookErrorCallback): Schema;
post(method: string, isAsync: boolean, fn: HookAsyncCallback): Schema;
post(method: string, isAsync: boolean, fn: HookAsyncCallback, errorCb: HookErrorCallback): Schema;
pre(method: string, fn: HookSyncCallback, errorCb?: HookErrorCallback): Schema;
pre(method: string, isAsync: boolean, fn: HookAsyncCallback, errorCb?: HookErrorCallback): Schema;
post(method: string, fn: HookSyncCallback, errorCb?: HookErrorCallback): Schema;
post(method: string, isAsync: boolean, fn: HookAsyncCallback, errorCb?: HookErrorCallback): Schema;
requiredPaths(): string[];
set(key: string, value: any): void;