import { LoggerLevel } from '@deepkit/logger';
import { ArrowFunctionNoArgs, VoidFunction } from '../../types';
export declare const SentryLiftKeysToTagsFromLoggerContext: never[];
export interface DecoratedError extends Error {
    cause?: Error;
    context?: Record<string, any>;
}
export declare function isError(e: any): e is Error;
export declare function getErrorMessage(e: any): string;
export declare function toError(e: any, cause?: any): Error;
export declare function tryOrErrorSync<T extends ArrowFunctionNoArgs>(fn: T): ReturnType<T> | Error;
export declare function tryOrError<T extends ArrowFunctionNoArgs>(fn: T): Promise<ReturnType<T> | Error>;
export declare function tryWithReject<T extends (reject: VoidFunction) => Promise<any>>(fn: T): Promise<ReturnType<T>>;
export interface IErrorContext {
    scope?: string;
    scopeData?: Record<string, any>;
    loggerContext?: Record<string, any>;
    data?: Record<string, any>;
}
export declare function setGlobalErrorReporter(reporter: (label: LoggerLevel, err: Error, context: IErrorContext) => void): void;
export declare function reportError(level: LoggerLevel, err: Error, context: IErrorContext): void;
export declare type __ΩDecoratedError = any[];
export declare type __ΩIErrorContext = any[];
//# sourceMappingURL=error.d.ts.map