Skip to content

Commit 01d2f2d

Browse files
committed
return type void to undefined
1 parent c3a8137 commit 01d2f2d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/core/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ export interface MutationOptions<
472472
mutationFn?: MutationFunction<TData, TVariables>
473473
mutationKey?: MutationKey
474474
variables?: TVariables
475-
onMutate?: (variables: TVariables) => Promise<TContext> | TContext | void
475+
onMutate?: (variables: TVariables) => Promise<TContext> | TContext | undefined
476476
onSuccess?: (
477477
data: TData,
478478
variables: TVariables,

src/react/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export interface UseMutationOptions<
7575
TContext = unknown
7676
> {
7777
mutationKey?: string | unknown[]
78-
onMutate?: (variables: TVariables) => Promise<TContext> | TContext | void
78+
onMutate?: (variables: TVariables) => Promise<TContext> | TContext | undefined
7979
onSuccess?: (
8080
data: TData,
8181
variables: TVariables,

0 commit comments

Comments
 (0)