diff --git a/packages/core-api/src/app/App.tsx b/packages/core-api/src/app/App.tsx index 82b224fe59..4a23c26bba 100644 --- a/packages/core-api/src/app/App.tsx +++ b/packages/core-api/src/app/App.tsx @@ -65,8 +65,8 @@ import { AppComponents, AppConfigLoader, AppOptions, + AppRouteBinder, BackstageApp, - BindRouteFunc, SignInPageProps, SignInResult, } from './types'; @@ -77,7 +77,7 @@ export function generateBoundRoutes( const result = new Map(); if (bindRoutes) { - const bind: BindRouteFunc = (externalRoutes, targetRoutes) => { + const bind: AppRouteBinder = (externalRoutes, targetRoutes) => { for (const [key, value] of Object.entries(targetRoutes)) { const externalRoute = externalRoutes[key]; if (!externalRoute) { diff --git a/packages/core-api/src/app/types.ts b/packages/core-api/src/app/types.ts index 3eeac72a30..898f4d978b 100644 --- a/packages/core-api/src/app/types.ts +++ b/packages/core-api/src/app/types.ts @@ -79,7 +79,7 @@ export type AppComponents = { */ export type AppConfigLoader = () => Promise; -export type BindRouteFunc = ( +export type AppRouteBinder = ( externalRoutes: T, targetRoutes: { [key in keyof T]: RouteRef }, ) => void; @@ -159,7 +159,7 @@ export type AppOptions = { * } * ``` */ - bindRoutes?(context: { bind: BindRouteFunc }): void; + bindRoutes?(context: { bind: AppRouteBinder }): void; }; export type BackstageApp = {