import type { ComponentType } from 'react'; import type { MiddlewareMatcher } from '../build/analysis/get-page-static-info'; declare global { interface Window { __BUILD_MANIFEST?: Record; __BUILD_MANIFEST_CB?: Function; __MIDDLEWARE_MATCHERS?: MiddlewareMatcher[]; __MIDDLEWARE_MANIFEST_CB?: Function; __PRERENDER_MANIFEST?: string; } } interface LoadedEntrypointSuccess { component: ComponentType; exports: any; } interface LoadedEntrypointFailure { error: unknown; } type RouteEntrypoint = LoadedEntrypointSuccess | LoadedEntrypointFailure; interface RouteStyleSheet { href: string; content: string; } interface LoadedRouteSuccess extends LoadedEntrypointSuccess { styles: RouteStyleSheet[]; } interface LoadedRouteFailure { error: unknown; } type RouteLoaderEntry = LoadedRouteSuccess | LoadedRouteFailure; export interface RouteLoader { whenEntrypoint(route: string): Promise; onEntrypoint(route: string, execute: () => unknown): void; loadRoute(route: string, prefetch?: boolean): Promise; prefetch(route: string): Promise; } export declare function markAssetError(err: Error): Error; export declare function isAssetError(err?: Error): boolean | undefined; export declare function getClientBuildManifest(): Promise>; export declare function createRouteLoader(assetPrefix: string): RouteLoader; export {};