fumadocs-core
Version:
The React.js library for building a documentation website
21 lines (20 loc) • 793 B
TypeScript
import Negotiator from "negotiator";
//#region src/negotiation/index.d.ts
declare function getNegotiator(request: Request): Negotiator;
/**
* Rewrite incoming path matching the `source` pattern into the `destination` pattern.
*
* See [`path-to-regexp`](https://github.com/pillarjs/path-to-regexp) for accepted pattern formats.
*
* @param source - the original pattern of incoming paths
* @param destination - the target pattern to convert into
*/
declare function rewritePath(source: string, destination: string): {
rewrite(pathname: string): string | false;
};
declare function isMarkdownPreferred(request: Request, options?: {
markdownMediaTypes?: string[];
}): boolean;
//#endregion
export { getNegotiator, isMarkdownPreferred, rewritePath };
//# sourceMappingURL=index.d.ts.map