Skip to content

Commit 5f2178e

Browse files
committed
Fix internal providedBy type issue
1 parent a2ac21d commit 5f2178e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/toolkit/src/query/core/buildThunks.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import type {
2626
PageParamFrom,
2727
QueryArgFrom,
2828
QueryDefinition,
29+
ResultDescription,
2930
ResultTypeFrom,
3031
} from '../endpointDefinitions'
3132
import {
@@ -973,14 +974,18 @@ export function getPreviousPageParam(
973974

974975
export function calculateProvidedByThunk(
975976
action: UnwrapPromise<
976-
ReturnType<ReturnType<QueryThunk>> | ReturnType<ReturnType<MutationThunk>>
977+
| ReturnType<ReturnType<QueryThunk>>
978+
| ReturnType<ReturnType<MutationThunk>>
979+
| ReturnType<ReturnType<InfiniteQueryThunk<any>>>
977980
>,
978981
type: 'providesTags' | 'invalidatesTags',
979982
endpointDefinitions: EndpointDefinitions,
980983
assertTagType: AssertTagTypes,
981984
) {
982985
return calculateProvidedBy(
983-
endpointDefinitions[action.meta.arg.endpointName][type],
986+
endpointDefinitions[action.meta.arg.endpointName][
987+
type
988+
] as ResultDescription<any, any, any, any, any>,
984989
isFulfilled(action) ? action.payload : undefined,
985990
isRejectedWithValue(action) ? action.payload : undefined,
986991
action.meta.arg.originalArgs,

0 commit comments

Comments
 (0)