Open History to see the last commit
1---
2id: withAcceptedReceipt
3title: withAcceptedReceipt
4---
5
6```ts
7function withAcceptedReceipt(visible, accepted): Promise<void>;
8```
9
10Defined in: [packages/db/src/sync-receipt.ts:14](https://github.com/TanStack/db/blob/main/packages/db/src/sync-receipt.ts#L14)
11
12**`Internal`**
13
14Attaches the moment a sync transaction was accepted to the receipt that
15resolves when it is visible. A wrapping sync, such as persistence, accepts
16after its durable step.
17
18 Adapter infrastructure, not an application API.
19
20## Parameters
21
22### visible
23
24`Promise`\<`void`\>
25
26### accepted
27
28[`SyncAppliedReceipt`](../type-aliases/SyncAppliedReceipt.md)
29
30## Returns
31
32`Promise`\<`void`\>