Open History to see the last commit
1---
2id: withCollectionConfigFactory
3title: withCollectionConfigFactory
4---
5
6```ts
7function withCollectionConfigFactory<TConfig>(
8 config,
9 factory,
10claim?): CollectionConfigWithFactory<TConfig>;
11```
12
13Defined in: [packages/db/src/client.ts:99](https://github.com/TanStack/db/blob/main/packages/db/src/client.ts#L99)
14
15Adds a fresh-config materializer to an adapter options object.
16
17Adapter option creators should use this so a module-scoped descriptor can be
18materialized safely by more than one DbClient.
19
20## Type Parameters
21
22### TConfig
23
24`TConfig` *extends* `AnyCollectionConfig`
25
26## Parameters
27
28### config
29
30`TConfig`
31
32### factory
33
34(`client`) => `TConfig`
35
36### claim?
37
38() => `void` \| () => `void`
39
40## Returns
41
42`CollectionConfigWithFactory`\<`TConfig`\>