Skip to content

Commit a04208e

Browse files
authored
Apply suggestions from code review
1 parent 0e7c9a6 commit a04208e

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

docs/rtk-query/api/createApi.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,7 @@ export const { useGetPokemonByNameQuery } = pokemonApi
6565
}
6666
) =>
6767
| undefined
68-
| CombinedState<
69-
NoInfer<Definitions>,
70-
NoInfer<TagTypes>,
71-
NoInfer<ReducerPath>
72-
>
68+
| CombinedState<Definitions, TagTypes, ReducerPath>
7369
tagTypes?: readonly TagTypes[];
7470
reducerPath?: ReducerPath;
7571
serializeQueryArgs?: SerializeQueryArgs<InternalQueryArgs>;

docs/rtk-query/api/created-api/overview.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ type Api = {
6060
args: QueryArgFrom<Definitions[EndpointName]>
6161
) =>
6262
| QueryActionCreatorResult<Definitions[EndpointName]>
63+
| undefined
64+
getRunningOperationPromise: <EndpointName extends MutationKeys<Definitions>>(
65+
endpointName: EndpointName,
66+
fixedCacheKeyOrRequestId: string
67+
) =>
6368
| MutationActionCreatorResult<Definitions[EndpointName]>
6469
| undefined
6570
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ declare module '../apiTypes' {
142142
/**
143143
* If a promise is running for a given endpoint name + argument combination,
144144
* returns that promise. Otherwise, returns `undefined`.
145-
* Useful for SSR scenarios to await a specific query/mutation triggered in any way,
145+
* Can be used to await a specific query/mutation triggered in any way,
146146
* including via hook calls, or manually dispatching `initiate` actions.
147147
*/
148148
getRunningOperationPromise<EndpointName extends QueryKeys<Definitions>>(

0 commit comments

Comments
 (0)