MCPcopy Index your code
hub / github.com/TanStack/db / unregisterTransaction

Function unregisterTransaction

packages/db/src/transactions.ts:191–200  ·  view source on GitHub ↗
(tx: Transaction<any>)

Source from the content-addressed store, hash-verified

189}
190
191function unregisterTransaction(tx: Transaction<any>) {
192 // Always flush pending work for this transaction before removing it from
193 // the ambient stack – this runs even if the mutate callback throws.
194 // If flush throws (e.g., due to a job error), we still clean up the stack.
195 try {
196 transactionScopedScheduler.flush(tx.id)
197 } finally {
198 transactionStack = transactionStack.filter((t) => t.id !== tx.id)
199 }
200}
201
202function removeFromPendingList(tx: Transaction<any>) {
203 const index = transactions.findIndex((t) => t.id === tx.id)

Callers 1

mutateMethod · 0.85

Calls 2

flushMethod · 0.80
filterMethod · 0.80

Tested by

no test coverage detected