0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

bug: removes type override from defineAction (#11292)

* bug: removes type override

* add changeset

* Update .changeset/quiet-doors-eat.md

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
This commit is contained in:
Jacob Jenkins 2024-06-20 08:34:11 +01:00 committed by GitHub
parent 53e8bb6d5f
commit 7f8f347995
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
"astro": patch
---
Fixes a case where `defineAction` autocomplete for the `accept` prop would not show `"form"` as a possible value

View file

@ -50,7 +50,7 @@ export type ActionClient<
export function defineAction<
TOutput,
TAccept extends Accept = 'json',
TAccept extends Accept,
TInputSchema extends InputSchema<Accept> | undefined = TAccept extends 'form'
? // If `input` is omitted, default to `FormData` for forms and `any` for JSON.
z.ZodType<FormData>