/** * Create a docs handler for serving bunpress-built documentation * within an existing Bun.serve() application. * * @example * ```ts * const docs = await createDocsHandler({ * buildDir: './dist/.bunpress', * pathPrefix: '/docs', * }) * * Bun.serve({ * fetch(req) { * const url = new URL(req.url) * * // Docs handler * if (url.pathname === '/docs' || url.pathname.startsWith('/docs/')) { * const res = await docs.fetch(req) * if (res) return res * } * * // Your other routes... * return new Response('Not found', { status: 404 }) * }, * }) * ``` */ export declare function createDocsHandler(options: DocsHandlerOptions): Promise; export declare interface DocsHandlerOptions { buildDir: string pathPrefix?: string cacheControl?: string } export declare interface DocsHandler { fetch: (req: Request) => Promise }