Skip to content

Commit 73acac6

Browse files
committed
ts: use-fetchs type
1 parent 98acfa5 commit 73acac6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/hooks/src/useFetchs/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ function useFetchs<TData, TParams>(
5555
watchEffect(() => {
5656
fetchs.value[cacheKey as string] = {
5757
key: cacheKey,
58-
data: data?.value as UnwrapRef<TData>,
59-
params: params.value as UnwrapRef<TParams>,
58+
data: data?.value as TData,
59+
params: params.value as TParams,
6060
loading: loading.value as UnwrapRef<boolean>,
6161
}
6262
getFetchs(fetchs.value as Fetchs)
@@ -75,8 +75,8 @@ function useFetchs<TData, TParams>(
7575
const fetchKey = keyIsStringOrNumber(key) ? key : DEFAULT_KEY
7676
fetchs.value[fetchKey] = {
7777
key: fetchKey,
78-
data: newData as UnwrapRef<TData>,
79-
params: newParams as UnwrapRef<TParams>,
78+
data: newData as TData,
79+
params: newParams as TParams,
8080
loading: newLoading as UnwrapRef<boolean>,
8181
}
8282
getFetchs(fetchs.value as Fetchs)

0 commit comments

Comments
 (0)