@intuitionrobotics/thunderstorm
Version:
27 lines (26 loc) • 1.22 kB
TypeScript
import { Module } from "@intuitionrobotics/ts-common";
import * as React from "react";
import { RouteParams, RoutePath } from "./route";
declare class RoutingModule_Class extends Module<{}> {
private readonly routes;
private readonly ordinalRoutes;
private readonly createNavLinkNode;
private readonly createRouteNode;
private readonly createLinkNode;
constructor();
init(): void;
clearRoutes(): void;
addRoute(key: string, route: string, component: React.ComponentType<any> | string): RoutePath;
getRoute(key: string): RoutePath;
isRouteRegistered(key: string): boolean;
getPath(key: string): string;
goToRoute(key: string, params?: RouteParams): void;
redirect(key: string): React.JSX.Element;
getMyRouteKey: () => string | undefined;
getNavLinks(keys: string[]): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
getNavLink(key: string): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
getLink(key: string): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
getRoutesMap(keys?: string[]): React.JSX.Element;
}
export declare const RoutingModule: RoutingModule_Class;
export {};