From 4f7f20616ed2b63f94ebf43bc5fdc1be55062a94 Mon Sep 17 00:00:00 2001 From: Jeffrey Yasskin Date: Wed, 7 Dec 2022 07:52:12 -0800 Subject: [PATCH] Allow all redirection status codes in redirect() (#5446) See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages for the list. --- .changeset/chilly-pumpkins-fetch.md | 5 +++++ packages/astro/src/@types/astro.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/chilly-pumpkins-fetch.md 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 = Record = Record>