Skip to content

Commit

Permalink
fix: callback type definitions in MutationFn for improved clarity and…
Browse files Browse the repository at this point in the history
… consistency
  • Loading branch information
braden-w committed Dec 23, 2024
1 parent 64ab805 commit 69be638
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/gentle-clocks-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@epicenterhq/result": patch
---

Fix callback type definitions in MutationFn for improved clarity and consistency
4 changes: 2 additions & 2 deletions src/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export type QueryFn<I, O, ServiceErrorProperties> = (
export type MutationFn<I, O, ServiceErrorProperties> = (
input: I,
callbacks: {
onMutate: (data: O) => void;
onSuccess: () => void;
onMutate: (input: I) => void;
onSuccess: (output: O) => void;
onError: (error: ServiceErrorProperties) => void;
onSettled: () => void;
},
Expand Down

0 comments on commit 69be638

Please sign in to comment.