core-api: rename BindRouteFunc to AppRouteBinder
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user