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:
parent
53e8bb6d5f
commit
7f8f347995
2 changed files with 6 additions and 1 deletions
5
.changeset/quiet-doors-eat.md
Normal file
5
.changeset/quiet-doors-eat.md
Normal 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
|
|
@ -50,7 +50,7 @@ export type ActionClient<
|
||||||
|
|
||||||
export function defineAction<
|
export function defineAction<
|
||||||
TOutput,
|
TOutput,
|
||||||
TAccept extends Accept = 'json',
|
TAccept extends Accept,
|
||||||
TInputSchema extends InputSchema<Accept> | undefined = TAccept extends 'form'
|
TInputSchema extends InputSchema<Accept> | undefined = TAccept extends 'form'
|
||||||
? // If `input` is omitted, default to `FormData` for forms and `any` for JSON.
|
? // If `input` is omitted, default to `FormData` for forms and `any` for JSON.
|
||||||
z.ZodType<FormData>
|
z.ZodType<FormData>
|
||||||
|
|
Loading…
Reference in a new issue