import { AppError } from './AppError'; /** * Narrow `unknown` (the type of a catch variable when `useUnknownInCatchVariables` is on) * to an AppError. Pass through existing AppErrors unchanged; wrap raw Errors and other * values in UnknownError, preserving the original via `cause`. * * @example * try { * await doThing(); * } catch (e) { * throw toAppError(e); * } */ export declare const toAppError: (caught: unknown, fallbackMessage?: string) => AppError;