summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/chilly-pumpkins-fetch.md5
-rw-r--r--packages/astro/src/@types/astro.ts2
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/chilly-pumpkins-fetch.md b/.changeset/chilly-pumpkins-fetch.md
new file mode 100644
index 000000000..f0e5ef55c
--- /dev/null
+++ b/.changeset/chilly-pumpkins-fetch.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Fix redirect() typing to allow all redirection status codes.
diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts
index 4bbbe996f..c27d88b47 100644
--- a/packages/astro/src/@types/astro.ts
+++ b/packages/astro/src/@types/astro.ts
@@ -1190,7 +1190,7 @@ interface AstroSharedContext<Props extends Record<string, any> = Record<string,
/**
* Redirect to another page (**SSR Only**).
*/
- redirect(path: string, status?: 301 | 302 | 308): Response;
+ redirect(path: string, status?: 301 | 302 | 303 | 307 | 308): Response;
}
export interface APIContext<Props extends Record<string, any> = Record<string, any>>