Open History to see the last commit
1---
2id: whenSyncAccepted
3title: whenSyncAccepted
4---
5
6```ts
7function whenSyncAccepted(receipt): SyncAppliedReceipt;
8```
9
10Defined in: [packages/db/src/sync-receipt.ts:32](https://github.com/TanStack/db/blob/main/packages/db/src/sync-receipt.ts#L32)
11
12**`Internal`**
13
14The moment a receipt's sync transaction was accepted. Handler-facing writes
15and Collection readiness wait for this, not for visibility: a transaction held by a persisting
16optimistic transaction becomes visible only when that transaction settles,
17so a handler awaiting visibility would wait for itself. Core accepts at
18`commit()`. A receipt that carries no acceptance moment is treated as
19accepted only when it resolves.
20
21 Adapter infrastructure, not an application API.
22
23## Parameters
24
25### receipt
26
27[`SyncAppliedReceipt`](../type-aliases/SyncAppliedReceipt.md)
28
29## Returns
30
31[`SyncAppliedReceipt`](../type-aliases/SyncAppliedReceipt.md)