@visulima/error
Version:
Error with more than just a message, stacktrace parsing.
23 lines (22 loc) • 856 B
TypeScript
import type { CodeFrameOptions, ColorizeMethod } from "../../index.d.ts";
import type { VisulimaError } from "../visulima-error.d.ts";
export type Options = Omit<CodeFrameOptions, "message | prefix"> & {
color: CodeFrameOptions["color"] & {
fileLine: ColorizeMethod;
hint: ColorizeMethod;
method: ColorizeMethod;
title: ColorizeMethod;
};
cwd: string;
displayShortPath: boolean;
filterStacktrace: ((line: string) => boolean) | undefined;
framesMaxLimit: number;
hideErrorCauseCodeView: boolean;
hideErrorCodeView: boolean;
hideErrorErrorsCodeView: boolean;
hideErrorTitle: boolean;
hideMessage: boolean;
indentation: number | "\t";
prefix: string;
};
export declare const renderError: (error: AggregateError | Error | VisulimaError, options?: Partial<Options>) => string;