convertLegacyRouteRefs()
Home > @backstage/core-compat-api
> convertLegacyRouteRefs
Converts a collection of legacy route refs to the new system. This is particularly useful when defining plugin routes
and externalRoutes
.
Signature:
function convertLegacyRouteRefs<TRefs extends {
[name in string]: LegacyRouteRef | LegacySubRouteRef | LegacyExternalRouteRef;
}>(refs: TRefs): {
[KName in keyof TRefs]: ToNewRouteRef<TRefs[KName]>;
};
Parameters
Parameter |
Type |
Description |
---|---|---|
refs |
TRefs |
{ [KName in keyof TRefs]: ToNewRouteRef<TRefs[KName]>; }