expose stronger typed SubmitFunction#9201
Conversation
dummdidumm
left a comment
There was a problem hiding this comment.
Thank you! Regarding "not possible to distinguish between success and failure": Wouldn't that be possible if we introduce a new helper type? There's ActionFailure extends the UniqueInterface which means it's possible to know which is which - AwaitedActions already uses this to unpack them. Two new helper types could be used to filter out the fail/success cases.
|
What I really meant is: there are no helper types present to distinguish between those two. |
ivanhofer
left a comment
There was a problem hiding this comment.
@dummdidumm I have added the distinction between success and failure type
🦋 Changeset detectedLatest commit: 1ad8a3b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
partially implements #7161
This PR adds stronger type definitions for
SubmitFunctionto the types genereted inside$types.d.ts. Unfortunately it is currently not possible to distinguish betweenSuccessandInvalidwith the currentKithelper types. This could be implemented in a future version.Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.