Skip to content

Commit 5f73635

Browse files
authored
fix(types): use MutationKey in UseMutationOptions (TanStack#2164)
1 parent 6fe0033 commit 5f73635

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/react/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
InfiniteQueryObserverResult,
55
MutateOptions,
66
MutationStatus,
7+
MutationKey,
78
QueryObserverOptions,
89
QueryObserverResult,
910
QueryKey,
@@ -74,7 +75,7 @@ export interface UseMutationOptions<
7475
TVariables = void,
7576
TContext = unknown
7677
> {
77-
mutationKey?: string | unknown[]
78+
mutationKey?: MutationKey
7879
onMutate?: (variables: TVariables) => Promise<TContext> | Promise<undefined> | TContext | undefined
7980
onSuccess?: (
8081
data: TData,

0 commit comments

Comments
 (0)