Skip to content

Commit 7edaa5c

Browse files
committed
refactor: update return type of mutate function to promise for better handling
1 parent efb52ea commit 7edaa5c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/types/react-hooks.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ export interface UseFetcherResult<
7171
PathParams
7272
>['data'],
7373
mutationSettings?: MutationSettings,
74-
) => void;
74+
) => Promise<FetchResponse<
75+
ResponseData,
76+
RequestBody,
77+
QueryParams,
78+
PathParams
79+
> | null>;
7580
/**
7681
* Function to refetch the data from the server.
7782
* This will trigger a new fetch operation and update the cache with the latest data.

0 commit comments

Comments
 (0)