downtimer
Version:
Timeouts, but a little more relaxing
15 lines (14 loc) • 683 B
TypeScript
import { type Colors } from './colors';
export type StackFrame = {
file: string;
function: string | null;
pos: [number, number] | null;
};
/** Parse a stack trace from an Error object */
export declare function parseStackFromError(e: Error): StackFrame[];
/** Get the current stack trace */
export declare function getStackTrace(): StackFrame[];
/** Given a stack trace, display it to the user in a colorful and friendly manner */
export declare function displayTrace(trace: StackFrame[], colors: Colors): void;
/** Given an Error object, display it to the user in a colorful and friendly manner */
export declare function displayError(e: unknown, colors: Colors): void;