Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas authored Oct 29, 2021
1 parent 0e7c9a6 commit a04208e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 1 addition & 5 deletions docs/rtk-query/api/createApi.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,7 @@ export const { useGetPokemonByNameQuery } = pokemonApi
}
) =>
| undefined
| CombinedState<
NoInfer<Definitions>,
NoInfer<TagTypes>,
NoInfer<ReducerPath>
>
| CombinedState<Definitions, TagTypes, ReducerPath>
tagTypes?: readonly TagTypes[];
reducerPath?: ReducerPath;
serializeQueryArgs?: SerializeQueryArgs<InternalQueryArgs>;
Expand Down
5 changes: 5 additions & 0 deletions docs/rtk-query/api/created-api/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ type Api = {
args: QueryArgFrom<Definitions[EndpointName]>
) =>
| QueryActionCreatorResult<Definitions[EndpointName]>
| undefined
getRunningOperationPromise: <EndpointName extends MutationKeys<Definitions>>(
endpointName: EndpointName,
fixedCacheKeyOrRequestId: string
) =>
| MutationActionCreatorResult<Definitions[EndpointName]>
| undefined
}
Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/src/query/core/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ declare module '../apiTypes' {
/**
* If a promise is running for a given endpoint name + argument combination,
* returns that promise. Otherwise, returns `undefined`.
* Useful for SSR scenarios to await a specific query/mutation triggered in any way,
* Can be used to await a specific query/mutation triggered in any way,
* including via hook calls, or manually dispatching `initiate` actions.
*/
getRunningOperationPromise<EndpointName extends QueryKeys<Definitions>>(
Expand Down

0 comments on commit a04208e

Please sign in to comment.