import React from 'react'; import { type ErrorBoundaryFallbackProps } from './error-boundary.js'; export interface NestedRoute { path: string; element?: React.ReactNode; lazy?: () => Promise<{ default: React.ComponentType<{ children?: React.ReactNode; }>; }>; children?: NestedRoute[]; index?: boolean; /** * Per-segment Suspense fallback — the `loading.tsx` convention. Rendered * while this segment's `lazy` component (or any Suspense-throwing descendant * up to the next boundary) resolves. */ loading?: React.ReactNode; /** * Per-segment error UI — the `error.tsx` convention. When a render in this * segment (or a descendant below the next error boundary) throws, this * fallback renders instead of bubbling to the parent segment. A render fn * receives `{ error, reset }`; a bare node is shown as-is. */ errorElement?: React.ReactNode | ((props: ErrorBoundaryFallbackProps) => React.ReactNode); } export interface MatchedRoute { route: NestedRoute; params: Record; consumed: string; } export declare function Outlet(): React.ReactElement | null; export interface NestedRouterProps { routes: NestedRoute[]; /** Rendered while lazy layouts resolve. */ fallback?: React.ReactNode; /** Rendered when no route matches. */ notFound?: React.ReactNode; } export declare function NestedRouter({ routes, fallback, notFound }: NestedRouterProps): React.ReactElement; export declare function resolveChain(routes: NestedRoute[], pathname: string): MatchedRoute[]; export declare function useOutletParams = Record>(): T; //# sourceMappingURL=nested-routes.d.ts.map