Fixed AstroUserConfig's redirect type definition (#7366)

This commit is contained in:
adenpun 2023-06-12 16:34:05 +08:00 committed by GitHub
parent 4f7091206c
commit 42baf62e7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Fixed `RedirectConfig` type definition

View file

@ -455,7 +455,7 @@ export interface AstroUserConfig {
/** /**
* @docs * @docs
* @name redirects (Experimental) * @name redirects (Experimental)
* @type {RedirectConfig} * @type {Record<string, RedirectConfig>}
* @default `{}` * @default `{}`
* @version 2.6.0 * @version 2.6.0
* @description Specify a mapping of redirects where the key is the route to match * @description Specify a mapping of redirects where the key is the route to match
@ -495,7 +495,7 @@ export interface AstroUserConfig {
* } * }
* ``` * ```
*/ */
redirects?: RedirectConfig; redirects?: Record<string, RedirectConfig>;
/** /**
* @docs * @docs