exception-formatter
Version:
[](https://github.com/semantic-release/semantic-release) [](ht
19 lines (15 loc) • 611 B
TypeScript
export = exceptionFormatter;
interface ExceptionFormatterOptionsCommon {
maxLines?: number | null | 'auto';
basepath?: string;
basepathReplacement?: string;
}
type ExceptionFormatterOptions =
| ExceptionFormatterOptionsCommon
| ({ format: 'ascii' } & ExceptionFormatterOptionsCommon)
| ({ format: 'ansi'; colors?: boolean } & ExceptionFormatterOptionsCommon)
| ({ format: 'html'; inlineStyle?: boolean } & ExceptionFormatterOptionsCommon);
declare function exceptionFormatter(
exception: Error | { stack: string } | string,
options?: ExceptionFormatterOptions,
): string;