DB Docs
API Reference
- Core API Reference
- Collection
- createCollection
- liveQueryCollectionOptions
- createLiveQueryCollection
- createOptimisticAction
- createTransaction
- Electric DB Collection
- electricCollectionOptions
- Query DB Collection
- queryCollectionOptions
- RxDB DB Collection
- rxdbCollectionOptions
- PowerSync Collection
- powerSyncCollectionOptions
- createIndexedDB
- indexedDBCollectionOptions
- React Hooks
- useLiveQuery
AI/LLM: This documentation page is available in plain markdown format at/db/latest/docs/reference/functions/whenSyncAccepted.md
whenSyncAccepted
ts
function whenSyncAccepted(receipt): SyncAppliedReceipt;Defined in: packages/db/src/sync-receipt.ts:32
Internal
The moment a receipt's sync transaction was accepted. Handler-facing writes and Collection readiness wait for this, not for visibility: a transaction held by a persisting optimistic transaction becomes visible only when that transaction settles, so a handler awaiting visibility would wait for itself. Core accepts at commit(). A receipt that carries no acceptance moment is treated as accepted only when it resolves.
Adapter infrastructure, not an application API.