export declare const toErrorMessage: (error: unknown) => string | null;
export declare const toErrorMessageWithFallback: (error: unknown, fallback: string) => string;
export declare const toErrorWithCode: (error: unknown, fallback: string) => {
    message: string;
    code?: string;
};
export type ErrorWithStage<TStage extends string> = {
    stage: TStage;
    message: string;
    cause?: unknown;
};
export declare const createErrorWithStage: <TStage extends string>(stage: TStage, fallback: string, cause?: unknown) => ErrorWithStage<TStage>;
//# sourceMappingURL=error-utils.d.ts.map