Skip to content

Commit bce210a

Browse files
committed
fix types for TS4.5
1 parent 26b4de1 commit bce210a

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,21 @@ declare module '../apiTypes' {
148148
getRunningOperationPromise<EndpointName extends QueryKeys<Definitions>>(
149149
endpointName: EndpointName,
150150
args: QueryArgFrom<Definitions[EndpointName]>
151-
): QueryActionCreatorResult<Definitions[EndpointName]> | undefined
151+
):
152+
| QueryActionCreatorResult<
153+
Definitions[EndpointName] & { type: 'query' }
154+
>
155+
| undefined
152156
getRunningOperationPromise<
153157
EndpointName extends MutationKeys<Definitions>
154158
>(
155159
endpointName: EndpointName,
156160
fixedCacheKeyOrRequestId: string
157-
): MutationActionCreatorResult<Definitions[EndpointName]> | undefined
161+
):
162+
| MutationActionCreatorResult<
163+
Definitions[EndpointName] & { type: 'mutation' }
164+
>
165+
| undefined
158166

159167
/**
160168
* A Redux thunk that can be used to manually trigger pre-fetching of data.

0 commit comments

Comments
 (0)