import type { DB } from './types.js'; /** Retry policy for {@link serializable}: how many attempts on a serialization failure / deadlock, and the base backoff between them. */ export interface SerializableOptions { readonly maxAttempts?: number; readonly backoffMs?: number; } /** The Postgres SQLSTATE carried by an error (or by its cause), or undefined for a non-Postgres error. */ export declare function pgErrorCode(err: unknown): unknown; /** True for Postgres serialization failures (40001) and deadlocks (40P01) — errors a retry can resolve. */ export declare function isTransientConcurrencyError(err: unknown): boolean; /** Runs `fn` in a SERIALIZABLE transaction, retrying on serialization failures (40001) and deadlocks (40P01) with exponential backoff. */ export declare function serializable(db: DB, fn: (tx: DB) => Promise, options?: SerializableOptions): Promise; //# sourceMappingURL=serializable.d.ts.map