import { LoggerInterface } from '../../kit/internal/Logger';
import { ValueOf } from '../../kit/utils/types';
export declare const isError: (error: unknown) => error is Error;
export declare const DEFAULT_ERROR_MESSAGE = "Unknown error encountered.";
export declare const ErrorLevel: {
    readonly Error: "error";
    readonly Fatal: "fatal";
    readonly Warn: "warning";
};
export type ErrorLevel = ValueOf<typeof ErrorLevel>;
export declare const ErrorType: {
    readonly Api: "api";
    readonly ApiBadResponse: "apiBadResponse";
    readonly Assert: "assert";
    readonly Auth: "auth";
    readonly Input: "input";
    readonly Server: "server";
    readonly Ui: "ui";
    readonly Unknown: "unknown";
};
export type ErrorType = ValueOf<typeof ErrorType>;
export declare const ERROR_NAMESPACE = "EH";
export interface DetErrorOptions {
    id?: string;
    isUserTriggered?: boolean;
    level?: ErrorLevel;
    logger?: LoggerInterface;
    payload?: unknown;
    publicMessage?: string;
    publicSubject?: string;
    silent?: boolean;
    type?: ErrorType;
}
export declare class DetError extends Error implements DetErrorOptions {
    id?: string;
    isUserTriggered: boolean;
    level: ErrorLevel;
    logger: LoggerInterface;
    payload?: unknown;
    publicMessage?: string;
    publicSubject?: string;
    silent: boolean;
    type: ErrorType;
    isHandled: boolean;
    /** the wrapped error if one was provided. */
    sourceErr: unknown;
    constructor(e?: any, options?: DetErrorOptions);
    loadOptions(options: DetErrorOptions): void;
}
export type ErrorHandler = (error: DetError | unknown, options?: DetErrorOptions) => DetError | void;
//# sourceMappingURL=error.d.ts.map