@neabyte/stackz
Version:
Beautiful stack trace formatter with source code context for JavaScript
28 lines (25 loc) • 795 B
text/typescript
/**
* Stack formatting style.
*/
type StackType = 'compact' | 'detailed';
/**
* Stack trace formatting utility.
* @description Provides formatted stack traces with compact and detailed styles.
*/
declare class Stackz {
/**
* Format an error's stack trace.
* @param error - The error object to format
* @param style - The formatting style to use
* @returns Formatted stack trace as string
* @throws {Error} When unknown format style is provided
*/
static format(error: Error, style: StackType): Promise<string> | string;
/**
* Parse error stack trace into structured data.
* @param error - The error to parse
* @returns Parsed error structure with type, message, and frames
*/
private static parseError;
}
export = Stackz;