Skip to content

Commit

Permalink
change type of redirectRoute
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Aug 29, 2024
1 parent 9830073 commit f2a5e3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/astro/src/integrations/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ function toIntegrationRouteData(route: RouteData): IntegrationRouteData {
segments: route.segments,
prerender: route.prerender,
redirect: route.redirect,
redirectRoute: route.redirectRoute,
redirectRoute: route.redirectRoute ? toIntegrationRouteData(route.redirectRoute) : undefined,
type: route.type,
pattern: route.pattern,
distURL: route.distURL,
Expand Down
7 changes: 6 additions & 1 deletion packages/astro/src/types/public/integrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,4 +243,9 @@ export interface AstroIntegration {
/**
* A smaller version of the {@link RouteData} that is used in the integrations.
*/
export type IntegrationRouteData = Omit<RouteData, 'isIndex' | 'fallbackRoutes'>;
export type IntegrationRouteData = Omit<RouteData, 'isIndex' | 'fallbackRoutes' | 'redirectRoute'> & {
/**
* {@link RouteData.redirectRoute}
*/
redirectRoute?: IntegrationRouteData
};

0 comments on commit f2a5e3d

Please sign in to comment.