/** * Strategy seam for the optional multi-record transaction service. * `runTransaction` is only reachable through `withTransactions()` * exported from `@noy-db/hub/tx`. Consumers who don't use * `db.transaction(fn)` ship none of the ~288 LOC. * * @internal */ import type { Noydb } from '../../kernel/noydb.js'; import type { TxContext, AmendmentTxOptions } from './transaction.js'; import type { DryRunResult } from './dry-run.js'; import type { TransactionInvariant } from './invariants.js'; /** * @internal */ export interface TxStrategy { runTransaction(db: Noydb, fn: (tx: TxContext) => Promise | T, options?: AmendmentTxOptions, txInvariants?: ReadonlyArray): Promise; runDryRun(db: Noydb, fn: (tx: TxContext) => unknown): Promise; } /** * @internal */ export declare const NO_TX: TxStrategy;