core-api: rename BindRouteFunc to AppRouteBinder

This commit is contained in:
Patrik Oldsberg
2020-12-16 12:03:17 +01:00
parent ad66d1c8c4
commit b3e7780d8f
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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<ExternalRouteRef, RouteRef>();
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) {
+2 -2
View File
@@ -79,7 +79,7 @@ export type AppComponents = {
*/
export type AppConfigLoader = () => Promise<AppConfig[]>;
export type BindRouteFunc = <T extends AnyExternalRoutes>(
export type AppRouteBinder = <T extends AnyExternalRoutes>(
externalRoutes: T,
targetRoutes: { [key in keyof T]: RouteRef<any> },
) => void;
@@ -159,7 +159,7 @@ export type AppOptions = {
* }
* ```
*/
bindRoutes?(context: { bind: BindRouteFunc }): void;
bindRoutes?(context: { bind: AppRouteBinder }): void;
};
export type BackstageApp = {