diff --git a/.changeset/quiet-doors-eat.md b/.changeset/quiet-doors-eat.md new file mode 100644 index 0000000000..587dba8ba7 --- /dev/null +++ b/.changeset/quiet-doors-eat.md @@ -0,0 +1,5 @@ +--- +"astro": patch +--- + +Fixes a case where `defineAction` autocomplete for the `accept` prop would not show `"form"` as a possible value diff --git a/packages/astro/src/actions/runtime/virtual/server.ts b/packages/astro/src/actions/runtime/virtual/server.ts index ce4d5f6966..d52a284ce3 100644 --- a/packages/astro/src/actions/runtime/virtual/server.ts +++ b/packages/astro/src/actions/runtime/virtual/server.ts @@ -50,7 +50,7 @@ export type ActionClient< export function defineAction< TOutput, - TAccept extends Accept = 'json', + TAccept extends Accept, TInputSchema extends InputSchema | undefined = TAccept extends 'form' ? // If `input` is omitted, default to `FormData` for forms and `any` for JSON. z.ZodType