import { InternError } from '../types';
import Executor from '../executors/Executor';
export default class ErrorFormatter implements ErrorFormatterProperties {
    readonly executor: Executor;
    constructor(executor: Executor);
    /**
     * Generates a full error message from a plain Error object, avoiding duplicate error messages that might be
     * caused by different opinions on what a stack trace should look like.
     *
     * @param error An object describing the error.
     * @returns A string message describing the error.
     */
    format(error: string | Error | InternError, options?: ErrorFormatOptions): string;
    protected _getSource(tracepath: string): string;
    /**
     * Creates a unified diff to explain the difference between two objects.
     *
     * @param actual The actual result.
     * @param expected The expected result.
     * @returns A unified diff formatted string representing the difference between the two objects.
     */
    protected _createDiff(actual: Object, expected: Object): string;
    /**
     * Return a trace line in a standardized format.
     */
    protected _formatLine(data: {
        func?: string;
        source: string;
    }): string;
    /**
     * Parse a stack trace, apply any source mappings, and normalize its format.
     */
    protected _normalizeStackTrace(stack: string): string;
    /**
     * Process Chrome, Opera, and IE traces.
     *
     * Ex)
     *   at Object._updateExpressionOptions (AxiomEditor.js:511)
     *   at Object.<anonymous> (AxiomEditor.js:291)
     *   at Function.m.emit (dojo.js.uncompressed.js:8875)
     */
    protected _processChromeTrace(lines: string[]): string[];
    /**
     * Process Safari and Firefox traces.
     *
     * Ex)
     *   _updateExpressionOptions@http://localhost:8080/AxiomEditor.js:511:49
     *   http://localhost:8080/AxiomEditor.js:291:34
     *   dispatchEvent@[native code]
     *   emit@http://ajax.googleapis.com/ajax/libs/dojo/1.12.2/dojo/dojo.js:118:282
     */
    protected _processSafariTrace(lines: string[]): string[];
}
export interface ErrorFormatterProperties {
    executor: Executor;
}
export interface ErrorFormatOptions {
    space?: string;
}
