From 160e35d63cd4239fa6fcb88d4e98964e06734c84 Mon Sep 17 00:00:00 2001 From: haoziqaq <357229046@qq.com> Date: Thu, 14 Nov 2024 00:11:53 +0800 Subject: [PATCH] types: improve onTransform types --- packages/axle/src/use.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/axle/src/use.ts b/packages/axle/src/use.ts index 6eae974..7401e03 100644 --- a/packages/axle/src/use.ts +++ b/packages/axle/src/use.ts @@ -31,7 +31,7 @@ export interface UseAxleOptions> { config?: AxleRequestConfig | (() => AxleRequestConfig) onBefore?(refs: UseAxleRefs): void onAfter?(refs: UseAxleRefs): void - onTransform?(response: R, refs: UseAxleRefs): V + onTransform?(response: R, refs: UseAxleRefs): V | Promise onSuccess?(response: R, refs: UseAxleRefs): void onError?(error: Error, refs: UseAxleRefs): void }