Skip to content

Commit

Permalink
bug: removes type override from defineAction (#11292)
Browse files Browse the repository at this point in the history
* bug: removes type override

* add changeset

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

Co-authored-by: Florian Lefebvre <[email protected]>

---------

Co-authored-by: Florian Lefebvre <[email protected]>
  • Loading branch information
jdtjenkins and florian-lefebvre authored Jun 20, 2024
1 parent 53e8bb6 commit 7f8f347
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/quiet-doors-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro": patch
---

Fixes a case where `defineAction` autocomplete for the `accept` prop would not show `"form"` as a possible value
2 changes: 1 addition & 1 deletion packages/astro/src/actions/runtime/virtual/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 7f8f347

Please sign in to comment.