type ErrorConstructorArgs = ConstructorParameters; /** * The options `Error` itself accepts, resolved against the integrator's * TypeScript lib: `ErrorOptions` (with `cause`) from ES2022, `never` before it. */ export type FunErrorOptions = 2 extends ErrorConstructorArgs['length'] ? NonNullable : never; /** * An error whose `message` is safe to show to the user. Throw it from an * integrator callback (for example a Polymarket account's `transfer`) to show * `message` in place of the SDK's generic error copy. The integrator owns the * wording and localization. Pass the underlying error as `cause` so it reaches * the logs. * * @example * throw new FunError(t('walletDisconnected'), { cause: error }) */ export declare class FunError extends Error { constructor(message: string, options?: FunErrorOptions); } export declare function isFunError(error: unknown): error is FunError; /** * The user-facing message of a {@link FunError}, or `null` for any other * error or an empty message (the caller then shows its generic copy). */ export declare function getFunErrorDisplayMessage(error: unknown): string | null; export {};