astro
Version:
Astro is a modern site builder with web best practices, performance, and DX front-of-mind.
11 lines (10 loc) • 567 B
TypeScript
import type { RouteData } from '../../types/public/internal.js';
import type { SSRManifest } from '../app/types.js';
/**
* Given a `Request`, returns the `RouteData` that matches its pathname — the
* appless, purely functional body of `BaseApp.match()`. By default, prerendered
* routes aren't returned, even if they are matched; when
* `allowPrerenderedRoutes` is `true`, matched prerendered routes are returned
* too.
*/
export declare function matchRequest(manifest: SSRManifest, request: Request, allowPrerenderedRoutes?: boolean): RouteData | undefined;