Skip to content
Source
Sign inSign up
TanStack/db
Open History to see the last commit

withCollectionSyncConfigCleanup.md

34 lines511 Bytes

1---
2id: withCollectionSyncConfigCleanup
3title: withCollectionSyncConfigCleanup
4---
5​
6```ts
7function withCollectionSyncConfigCleanup<TSync>(sync, cleanup): TSync;
8```
9​
10Defined in: [packages/db/src/collection/index.ts:98](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L98)
11​
12**`Internal`**
13​
14Registers work owned before an adapter sync starts.
15​
16## Type Parameters
17​
18### TSync
19​
20`TSync` *extends* `object`
21​
22## Parameters
23​
24### sync
25​
26`TSync`
27​
28### cleanup
29​
30() => `void`
31​
32## Returns
33​
34`TSync`