/** * Formats an error for logging by extracting the message if available, falling back to string conversion for non-Error objects. Trailing punctuation is stripped * to allow callers to add consistent punctuation in their log format strings. * @param error - The error to format. * @returns A string representation suitable for logging, without trailing punctuation. */ export declare function formatError(error: unknown): string; /** * Checks whether an error indicates that the browser page or session has been closed or is otherwise unrecoverable. These errors should cause immediate abort of * any retry loops rather than continuing to retry an operation that will never succeed. Common unrecoverable errors include closed targets, closed sessions, and * detached frames (which occur when the page has been closed mid-operation). * @param error - The error to check. * @returns True if the error indicates a closed or unrecoverable state. */ export declare function isSessionClosedError(error: unknown): boolean;