Skip to content

Commit

Permalink
rename TypedUseMutationTrigger to TypedMutationTrigger, and add depre…
Browse files Browse the repository at this point in the history
…cated alias
  • Loading branch information
EskiMojo14 committed Feb 14, 2024
1 parent d712ab3 commit 65d5a64
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/toolkit/src/query/react/buildHooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -589,14 +589,23 @@ export type MutationTrigger<D extends MutationDefinition<any, any, any, any>> =
(arg: QueryArgFrom<D>): MutationActionCreatorResult<D>
}

export type TypedUseMutationTrigger<
export type TypedMutationTrigger<
ResultType,
QueryArg,
BaseQuery extends BaseQueryFn,
> = MutationTrigger<
MutationDefinition<QueryArg, BaseQuery, string, ResultType, string>
>

/**
* @deprecated Prefer `TypedMutationTrigger`, this will be removed in the next major version.
*/
export type TypedUseMutationTrigger<
ResultType,
QueryArg,
BaseQuery extends BaseQueryFn,
> = TypedMutationTrigger<ResultType, QueryArg, BaseQuery>

/**
* Wrapper around `defaultQueryStateSelector` to be used in `useQuery`.
* We want the initial render to already come back with
Expand Down

0 comments on commit 65d5a64

Please sign in to comment.