Skip to main content
Version: Next

createExternalRouteRef()

Home > @backstage/frontend-plugin-api > createExternalRouteRef

Creates a route descriptor, to be later bound to a concrete route by the app. Used to implement cross-plugin route references.

Signature:

function createExternalRouteRef<TParams extends {
[param in TParamKeys]: string;
} | undefined = undefined, TParamKeys extends string = string>(options?: {
readonly params?: string extends TParamKeys ? (keyof TParams)[] : TParamKeys[];
defaultTarget?: string;
}): ExternalRouteRef<keyof TParams extends never ? undefined : string extends TParamKeys ? TParams : {
[param in TParamKeys]: string;
}>;

Parameters

Parameter

Type

Description

options

{ readonly params?: string extends TParamKeys ? (keyof TParams)[] : TParamKeys[]; defaultTarget?: string; }

(Optional) Description of the route reference to be created.

**Returns:**

ExternalRouteRef<keyof TParams extends never ? undefined : string extends TParamKeys ? TParams : { [param in TParamKeys]: string; }>

Remarks

See https://backstage.io/docs/plugins/composability#routing-system.