import type { IRoute } from 'dumi'; import type { Transformer } from 'unified'; export type RouteMappingOptions = { /** * Regular expression to match the links you want to rewrite. The regex MUST have a * capture group, and the capture group MUST capture the route ID. */ match: RegExp; /** * Function to extract the destination path from Dumi's router. * * @param match The route ID from the capture group in `match` * @param path The candidate path * @returns Whether the path is the correct destination */ resolve?: (match: string, path: string) => boolean; routes: Record; }; /** * Rewrite all s to s that point to Dumi routes. * * Caveat: The resulting s are in fact HAST Elements, not MDAST PhrasingContent. */ export declare function rehypeRewriteLinks({ match, resolve, routes }?: RouteMappingOptions): Transformer; //# sourceMappingURL=index.d.mts.map