securityos/node_modules/next/dist/lib/metadata/get-metadata-route.d.ts

19 lines
598 B
TypeScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
/**
* Fill the dynamic segment in the metadata route
*
* Example:
* fillMetadataSegment('/a/[slug]', { params: { slug: 'b' } }, 'open-graph') -> '/a/b/open-graph'
*
*/
export declare function fillMetadataSegment(segment: string, params: any, imageSegment: string): string;
/**
* Map metadata page key to the corresponding route
*
* static file page key: /app/robots.txt -> /robots.xml -> /robots.txt/route
* dynamic route page key: /app/robots.tsx -> /robots -> /robots.txt/route
*
* @param page
* @returns
*/
export declare function normalizeMetadataRoute(page: string): string;