Skip to content

Commit

Permalink
fix: return Promise<void> instead of Promise<unknown> (#135)
Browse files Browse the repository at this point in the history
* fix: return Promise<void> instead of Promise<unknown>

* fix: add changeset for patching '@formwerk/core' to return Promise<void>
  • Loading branch information
genu authored Feb 21, 2025
1 parent f123b1d commit 4a9be13
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/angry-pets-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@formwerk/core': patch
---

fix: return Promise<void> instead of Promise<unknown>
4 changes: 2 additions & 2 deletions packages/core/src/useForm/useFormActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export interface FormActions<TForm extends FormObject, TOutput extends FormObjec
* ```
*/
handleSubmit: (
onSuccess: (payload: ConsumableData<TOutput>, ctx: SubmitContext) => MaybeAsync<unknown>,
) => (e?: Event) => Promise<unknown>;
onSuccess: (payload: ConsumableData<TOutput>, ctx: SubmitContext) => MaybeAsync<void>,
) => (e?: Event) => Promise<void>;
/**
* Resets the form to its initial state.
*/
Expand Down

0 comments on commit 4a9be13

Please sign in to comment.