import type { NuxtPage } from '@nuxt/schema'; import type { NuxtSSRContext } from 'nuxt/app'; export type NuxtPageSubset = { path: NuxtPage['path']; file: NuxtPage['file']; }; /** * Extracts route information from the SSR context modules and URL. * * The function matches the requested URL against the build-time pages data. The build-time pages data * contains the routes that were generated during the build process, which allows us to set the parametrized route. * * @param ssrContextModules - The modules from the SSR context. * This is a Set of module paths that were used when loading one specific page. * Example: `Set(['app.vue', 'components/Button.vue', 'pages/user/[userId].vue'])` * * @param requestedUrl - The requested URL string * Example: `/user/123` * * @param buildTimePagesData * An array of NuxtPage objects representing the build-time pages data. * Example: [{ file: '/a/file/pages/some/path', path: '/some/path' }, { file: '/a/file/pages/user/[userId].vue', path: '/user/:userId()' }] */ export declare function extractParametrizedRouteFromContext(ssrContextModules?: NuxtSSRContext['modules'], requestedUrl?: NuxtSSRContext['url'], buildTimePagesData?: NuxtPageSubset[]): null | { parametrizedRoute: string; }; //# sourceMappingURL=route-extraction.d.ts.map