diff --git a/mongoose/mongoose.d.ts b/mongoose/mongoose.d.ts index 74d3663a76..b0f3dcdacd 100644 --- a/mongoose/mongoose.d.ts +++ b/mongoose/mongoose.d.ts @@ -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;