Open History to see the last commit
1---
2id: withCollectionSyncConfigFactory
3title: withCollectionSyncConfigFactory
4---
5
6```ts
7function withCollectionSyncConfigFactory<TSync>(sync, factory): CollectionSyncConfigWithFactory<TSync>;
8```
9
10Defined in: [packages/db/src/collection/index.ts:78](https://github.com/TanStack/db/blob/main/packages/db/src/collection/index.ts#L78)
11
12**`Internal`**
13
14The factory must defer `startSyncIfIdle` until construction ends.
15
16## Type Parameters
17
18### TSync
19
20`TSync` *extends* `object`
21
22## Parameters
23
24### sync
25
26`TSync`
27
28### factory
29
30(`source`, `utilities`, `startSyncIfIdle`) => `TSync`
31
32## Returns
33
34`CollectionSyncConfigWithFactory`\<`TSync`\>