Backstage
    Preparing search index...
    • Fake implementation of @backstage/frontend-plugin-api#RouteResolutionApi.

      Parameters

      • Optionaloptions: {
            resolve?: <TParams extends AnyRouteRefParams>(
                anyRouteRef:
                    | RouteRef<TParams>
                    | SubRouteRef<TParams>
                    | ExternalRouteRef<TParams>,
                options?: { sourcePath?: string },
            ) => RouteFunc<TParams> | undefined;
            resolvePath?:
                | {
                    matches: readonly (
                        Pick<RouteResolutionMatch, "node" | "basePath"> & Partial<
                            Omit<RouteResolutionMatch, "node" | "basePath">,
                        >
                    )[];
                }
                | (
                    (
                        options: { node?: AppNode; pathname: string },
                    ) => { matches: readonly RouteResolutionMatch[] }
                );
            routes?:
                | ReadonlyMap<
                    | RouteRef<AnyRouteRefParams>
                    | SubRouteRef<AnyRouteRefParams>
                    | ExternalRouteRef<AnyRouteRefParams>,
                    string,
                >
                | readonly [
                    | RouteRef<AnyRouteRefParams>
                    | SubRouteRef<AnyRouteRefParams>
                    | ExternalRouteRef<AnyRouteRefParams>,
                    string,
                ][];
        }
        • Optionalresolve?: <TParams extends AnyRouteRefParams>(
              anyRouteRef:
                  | RouteRef<TParams>
                  | SubRouteRef<TParams>
                  | ExternalRouteRef<TParams>,
              options?: { sourcePath?: string },
          ) => RouteFunc<TParams> | undefined

          Optional full resolve implementation. When set, it takes precedence over routes.

        • OptionalresolvePath?:
              | {
                  matches: readonly (
                      Pick<RouteResolutionMatch, "node" | "basePath"> & Partial<
                          Omit<RouteResolutionMatch, "node" | "basePath">,
                      >
                  )[];
              }
              | (
                  (
                      options: { node?: AppNode; pathname: string },
                  ) => { matches: readonly RouteResolutionMatch[] }
              )

          Fixed matches or a custom path-matching implementation. Defaults to no matches. Fixed matches ignore the requested pathname and node, defaulting routePattern to basePath, params to {}, and contributesPath to true. Callbacks return complete matches without applying these defaults.

        • Optionalroutes?:
              | ReadonlyMap<
                  | RouteRef<AnyRouteRefParams>
                  | SubRouteRef<AnyRouteRefParams>
                  | ExternalRouteRef<AnyRouteRefParams>,
                  string,
              >
              | readonly [
                  | RouteRef<AnyRouteRefParams>
                  | SubRouteRef<AnyRouteRefParams>
                  | ExternalRouteRef<AnyRouteRefParams>,
                  string,
              ][]

          Map of route refs to absolute path templates. Path params use the :param form (e.g. '/catalog/:namespace/:kind/:name'). When a mapped route is resolved, params are substituted into the template.

          String values without : segments are returned as-is for parameter-less refs.

      Returns RouteResolutionApi & {
          resolve: MockedFunction<
              <TParams extends AnyRouteRefParams>(
                  anyRouteRef:
                      | RouteRef<TParams>
                      | SubRouteRef<TParams>
                      | ExternalRouteRef<TParams>,
                  options?: { sourcePath?: string },
              ) => RouteFunc<TParams> | undefined,
          >;
          resolvePath: MockedFunction<
              (
                  options: { node?: AppNode; pathname: string },
              ) => { matches: readonly RouteResolutionMatch[] },
          >;
      } & {
          "[mockApiFactorySymbol]": ApiFactory<
              RouteResolutionApi,
              RouteResolutionApi,
              {},
          >;
      }