Skip to content

Commit

Permalink
Merge branch 'main' into error
Browse files Browse the repository at this point in the history
  • Loading branch information
JerryWu1234 authored Dec 8, 2022
2 parents 8452706 + 4f7f206 commit 5415ced
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/chilly-pumpkins-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix redirect() typing to allow all redirection status codes.
2 changes: 1 addition & 1 deletion packages/astro/src/@types/astro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>>
Expand Down

0 comments on commit 5415ced

Please sign in to comment.