export interface StackFrame { raw: string; type: "app" | "module" | "native"; fn?: string; file?: string; line?: number; col?: number; async?: boolean; /** Original source contents (from source map `sourcesContent`) */ source?: string; } /** * Apply source maps to the stack frames of `error` (and of its `cause` / `errors`). * * `error.stack` is rewritten with the original locations and the parsed frames are kept for renderers. */ export declare function loadStackTrace(error: unknown): Promise; /** Get the (source-mapped, when `loadStackTrace` ran) frames of an error. */ export declare function getFrames(error: unknown): StackFrame[]; /** Parse the frames of a V8 formatted `error.stack` (header lines are skipped). */ export declare function parseStack(stack: string): StackFrame[]; export declare function parseFrame(raw: string): StackFrame; export declare function formatFrame(frame: StackFrame): string; export declare function frameType(file: string | undefined): StackFrame["type"]; /** Short path for display: package-relative for dependencies, otherwise see {@link relativePath}. */ export declare function displayPath(file: string): string; /** Format a path relative to the current working directory (when inside it). */ export declare function relativePath(file: string): string;