diff --git a/packages/toolkit/src/query/react/buildHooks.ts b/packages/toolkit/src/query/react/buildHooks.ts index d3a8581a8b..d2432acc93 100644 --- a/packages/toolkit/src/query/react/buildHooks.ts +++ b/packages/toolkit/src/query/react/buildHooks.ts @@ -589,7 +589,7 @@ export type MutationTrigger> = (arg: QueryArgFrom): MutationActionCreatorResult } -export type TypedUseMutationTrigger< +export type TypedMutationTrigger< ResultType, QueryArg, BaseQuery extends BaseQueryFn, diff --git a/packages/toolkit/src/query/react/index.ts b/packages/toolkit/src/query/react/index.ts index ba2815f123..c979fbe0f2 100644 --- a/packages/toolkit/src/query/react/index.ts +++ b/packages/toolkit/src/query/react/index.ts @@ -21,7 +21,7 @@ export type { TypedLazyQueryTrigger, TypedUseLazyQuery, TypedUseMutation, - TypedUseMutationTrigger, + TypedMutationTrigger, TypedUseQueryState, TypedUseQuery, TypedUseQuerySubscription, diff --git a/packages/toolkit/src/query/tests/unionTypes.test-d.ts b/packages/toolkit/src/query/tests/unionTypes.test-d.ts index 2ab109dfa9..1c5768d24a 100644 --- a/packages/toolkit/src/query/tests/unionTypes.test-d.ts +++ b/packages/toolkit/src/query/tests/unionTypes.test-d.ts @@ -10,7 +10,7 @@ import type { TypedUseLazyQuery, TypedUseLazyQuerySubscription, TypedUseMutation, - TypedUseMutationTrigger, + TypedMutationTrigger, TypedUseQuerySubscription, TypedUseQuery, } from '@reduxjs/toolkit/query/react' @@ -838,7 +838,7 @@ describe('"Typed" helper types', () => { const [trigger, result] = api.endpoints.mutation.useMutation() expectTypeOf< - TypedUseMutationTrigger + TypedMutationTrigger >().toMatchTypeOf(trigger) expectTypeOf<