wilddragon-site/node_modules/next/dist/server/route-modules/app-page/helpers/prerender-manifest-matcher.d.ts
2026-04-17 15:51:01 -04:00

23 lines
858 B
TypeScript
Executable file

import type { DynamicPrerenderManifestRoute, PrerenderManifest } from '../../../../build';
import type { DeepReadonly } from '../../../../shared/lib/deep-readonly';
export type PrerenderManifestMatch = {
source: string;
route: DeepReadonly<DynamicPrerenderManifestRoute>;
};
/**
* A matcher for the prerender manifest.
*
* This class is used to match the pathname to the dynamic route.
*/
export declare class PrerenderManifestMatcher {
private readonly matchers;
constructor(pathname: string, prerenderManifest: DeepReadonly<PrerenderManifest>);
/**
* Match the pathname to the dynamic route. If no match is found, an error is
* thrown.
*
* @param pathname - The pathname to match.
* @returns The dynamic route that matches the pathname.
*/
match(pathname: string): PrerenderManifestMatch | null;
}