import { StackFrame } from "../../_chunks/_stack.mjs"; export interface ErrorPageOptions { status?: number; statusText?: string; request?: { method: string; url: string; headers: HeadersInit; }; } export interface HighlightToken { text: string; type?: string; } export interface CodeFrame { /** 1-based line number of the first line */ start: number; /** 1-based line number of the error line */ line: number; col?: number; /** Highlighted tokens per line */ lines: HighlightToken[][]; } /** Render a self-contained HTML error page with source-mapped, highlighted stack frames. */ export declare function renderErrorHTML(error: unknown, opts?: ErrorPageOptions): Promise; /** Render an error (with code frame, stack and causes) for terminal output. */ export declare function renderErrorANSI(error: unknown): Promise; /** Read and highlight the source lines around a frame location. */ export declare function getCodeFrame(frame: StackFrame, opts?: { context?: number; }): Promise;