0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00
astro/.changeset/fuzzy-pugs-live.md
Emanuele Stoppa ee38b3a946
refactor(next): send IntegrationRouteData to integrations (#11864)
Co-authored-by: Luiz Ferraz <luiz@lferraz.com>
Co-authored-by: Alexander Niebuhr <alexander@nbhr.io>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-09-13 11:44:55 +02:00

21 lines
615 B
Markdown

---
'astro': major
---
### [changed]: `routes` type inside the hook `astro:build:done`
In Astro v4.x, the `routes` type was `RouteData`.
Astro v5.0 the `routes` type is `IntegrationRouteData`, which contains a subset of the `RouteData` type. The fields `isIndex` and `fallbackRoutes` were removed.
#### What should I do?
Update your adapter to change the type of `routes` from `RouteData` to `IntegrationRouteData`.
```diff
-import type {RouteData} from 'astro';
+import type {IntegrationRouteData} from "astro"
-function useRoute(route: RouteData) {
+function useRoute(route: IntegrationRouteData) {
}
```