From 17ce7262df05a11e4cd4642f31f312ba1580760b Mon Sep 17 00:00:00 2001 From: frogcjn Date: Tue, 28 Jun 2016 12:17:22 +0800 Subject: [PATCH] fix post function --- mongoose/mongoose.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mongoose/mongoose.d.ts b/mongoose/mongoose.d.ts index 6d74a0e4b1..7a4d33c522 100644 --- a/mongoose/mongoose.d.ts +++ b/mongoose/mongoose.d.ts @@ -276,8 +276,7 @@ declare module "mongoose" { 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; + post(method: string, fn: (doc: Document, next?: HookNextFunction) => any ): Schema; requiredPaths(): string[]; set(key: string, value: any): void;