From fa612c44e230bd6eca3500df3cac69364f477354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=87=8E=E5=A3=B0?= Date: Fri, 8 Sep 2023 11:41:23 +0800 Subject: [PATCH] chore: update types --- src/helper/hook-helper.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/helper/hook-helper.ts b/src/helper/hook-helper.ts index 94cbcb5..5693cd9 100644 --- a/src/helper/hook-helper.ts +++ b/src/helper/hook-helper.ts @@ -307,7 +307,7 @@ export function createHookedFunction( }); } - function wrapped(): Result { + function wrapped(): Result | void | Promise { promise = runBeforeHooks(); if (promise) { @@ -330,9 +330,9 @@ export function createHookedFunction( if (promise) { return promise.then(() => { return ret; - }) as any; // 挂载了async hook方法 + }); } else { - return ret as any; + return ret; } } };