Skip to content

Commit abf386b

Browse files
authored
fix: accept any promise in useMutation callbacks (#1033)
1 parent 6a6a657 commit abf386b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core/types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,18 +230,18 @@ export interface MutateConfig<
230230
TVariables = unknown,
231231
TSnapshot = unknown
232232
> {
233-
onSuccess?: (data: TResult, variables: TVariables) => Promise<void> | void
233+
onSuccess?: (data: TResult, variables: TVariables) => Promise<unknown> | void
234234
onError?: (
235235
error: TError,
236236
variables: TVariables,
237237
snapshotValue: TSnapshot
238-
) => Promise<void> | void
238+
) => Promise<unknown> | void
239239
onSettled?: (
240240
data: undefined | TResult,
241241
error: TError | null,
242242
variables: TVariables,
243243
snapshotValue?: TSnapshot
244-
) => Promise<void> | void
244+
) => Promise<unknown> | void
245245
throwOnError?: boolean
246246
}
247247

0 commit comments

Comments
 (0)