| 1 |
|
| 2 | import { InitialEntry } from "../../router/history.js";
|
| 3 | import { ActionFunction, IndexRouteObject, LoaderFunction, NonIndexRouteObject, RouterContextProvider } from "../../router/utils.js";
|
| 4 | import { HydrationState } from "../../router/router.js";
|
| 5 | import { LinksFunction, MetaFunction } from "./routeModules.js";
|
| 6 | import { FutureConfig } from "./entry.js";
|
| 7 | import * as React$1 from "react";
|
| 8 |
|
| 9 |
|
| 10 | interface StubRouteExtensions {
|
| 11 | Component?: React$1.ComponentType<any>;
|
| 12 | HydrateFallback?: React$1.ComponentType<any>;
|
| 13 | ErrorBoundary?: React$1.ComponentType<any>;
|
| 14 | loader?: LoaderFunction;
|
| 15 | action?: ActionFunction;
|
| 16 | children?: StubRouteObject[];
|
| 17 | meta?: MetaFunction;
|
| 18 | links?: LinksFunction;
|
| 19 | }
|
| 20 | interface StubIndexRouteObject extends Omit<IndexRouteObject, "Component" | "HydrateFallback" | "ErrorBoundary" | "loader" | "action" | "element" | "errorElement" | "children">, StubRouteExtensions {}
|
| 21 | interface StubNonIndexRouteObject extends Omit<NonIndexRouteObject, "Component" | "HydrateFallback" | "ErrorBoundary" | "loader" | "action" | "element" | "errorElement" | "children">, StubRouteExtensions {}
|
| 22 | type StubRouteObject = StubIndexRouteObject | StubNonIndexRouteObject;
|
| 23 | interface RoutesTestStubProps {
|
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 |
|
| 30 | initialEntries?: InitialEntry[];
|
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 |
|
| 38 | initialIndex?: number;
|
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 |
|
| 46 | hydrationData?: HydrationState;
|
| 47 | |
| 48 | |
| 49 |
|
| 50 | future?: Partial<FutureConfig>;
|
| 51 | }
|
| 52 | |
| 53 | |
| 54 |
|
| 55 | declare function createRoutesStub(routes: StubRouteObject[], _context?: RouterContextProvider): ({
|
| 56 | initialEntries,
|
| 57 | initialIndex,
|
| 58 | hydrationData,
|
| 59 | future
|
| 60 | }: RoutesTestStubProps) => React$1.JSX.Element;
|
| 61 |
|
| 62 | export { RoutesTestStubProps, createRoutesStub }; |
| \ | No newline at end of file |