1 | import { InternError } from '../types';
|
2 | import { Executor } from '../executors/Executor';
|
3 | export default class ErrorFormatter implements ErrorFormatterProperties {
|
4 | readonly executor: Executor;
|
5 | constructor(executor: Executor);
|
6 | format(error: string | Error | InternError, options?: ErrorFormatOptions): string;
|
7 | protected _getSource(tracepath: string): string;
|
8 | protected _createDiff(actual: string, expected: string): string;
|
9 | protected _createDiff(actual: object, expected: object): string;
|
10 | protected _formatLine(data: {
|
11 | func?: string;
|
12 | source: string;
|
13 | }): string;
|
14 | protected _normalizeStackTrace(stack: string): string;
|
15 | protected _processChromeTrace(lines: string[]): string[];
|
16 | protected _processSafariTrace(lines: string[]): string[];
|
17 | }
|
18 | export interface ErrorFormatterProperties {
|
19 | executor: Executor;
|
20 | }
|
21 | export interface ErrorFormatOptions {
|
22 | space?: string;
|
23 | }
|