diff --git a/src/core/types.ts b/src/core/types.ts index ba3fafd529..8d1b94c9ad 100644 --- a/src/core/types.ts +++ b/src/core/types.ts @@ -481,7 +481,7 @@ export interface MutationOptions< variables?: TVariables onMutate?: ( variables: TVariables - ) => Promise | Promise | TContext | undefined + ) => Promise | TContext | undefined onSuccess?: ( data: TData, variables: TVariables, diff --git a/src/react/types.ts b/src/react/types.ts index 6e6da2f088..ef98597c46 100644 --- a/src/react/types.ts +++ b/src/react/types.ts @@ -77,7 +77,7 @@ export interface UseMutationOptions< mutationKey?: MutationKey onMutate?: ( variables: TVariables - ) => Promise | Promise | TContext | undefined + ) => Promise | TContext | undefined onSuccess?: ( data: TData, variables: TVariables,