createRouteRef()
Home > @backstage/frontend-plugin-api
> createRouteRef
Create a RouteRef from a route descriptor.
Signature:
function createRouteRef<TParams extends {
[param in TParamKeys]: string;
} | undefined = undefined, TParamKeys extends string = string>(config?: {
readonly params: string extends TParamKeys ? (keyof TParams)[] : TParamKeys[];
}): RouteRef<keyof TParams extends never ? undefined : string extends TParamKeys ? TParams : {
[param in TParamKeys]: string;
}>;
Parameters
Parameter |
Type |
Description |
---|---|---|
config |
{ readonly params: string extends TParamKeys ? (keyof TParams)[] : TParamKeys[]; } |
(Optional) Description of the route reference to be created. |
RouteRef<keyof TParams extends never ? undefined : string extends TParamKeys ? TParams : { [param in TParamKeys]: string; }>