diff options
author | 2022-10-06 12:42:17 -0300 | |
---|---|---|
committer | 2022-10-06 10:42:17 -0500 | |
commit | 3e02a66a7775f3652ccb179f30f1b4937472380e (patch) | |
tree | 4df890e0affa58ea95282413ac533fecbdf02e7b | |
parent | 70254076a189ed87549adad49439ee5d5b2170b8 (diff) | |
download | astro-3e02a66a7775f3652ccb179f30f1b4937472380e.tar.gz astro-3e02a66a7775f3652ccb179f30f1b4937472380e.tar.zst astro-3e02a66a7775f3652ccb179f30f1b4937472380e.zip |
Add type argument to AstroGlobal to type Props (#5000)
* Add type argument to AstroGlobal to type Props
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
-rw-r--r-- | packages/astro/src/@types/astro.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index 12782752c..398657f39 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -93,7 +93,7 @@ export interface BuildConfig { * * [Astro reference](https://docs.astro.build/reference/api-reference/#astro-global) */ -export interface AstroGlobal extends AstroGlobalPartial { +export interface AstroGlobal<Props extends Record<string, any> = Record<string, any>> extends AstroGlobalPartial { /** * Canonical URL of the current page. * @deprecated Use `Astro.url` instead. @@ -149,7 +149,7 @@ export interface AstroGlobal extends AstroGlobalPartial { * * [Astro reference](https://docs.astro.build/en/core-concepts/astro-components/#component-props) */ - props: Record<string, number | string | any>; + props: Props; /** Information about the current request. This is a standard [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) object * * For example, to get a URL object of the current URL, you can use: |