DB Docs
API Reference
- Core API Reference
- Collection
- createCollection
- liveQueryCollectionOptions
- createLiveQueryCollection
- createOptimisticAction
- createTransaction
- Electric DB Collection
- electricCollectionOptions
- Query DB Collection
- queryCollectionOptions
- RxDB DB Collection
- rxdbCollectionOptions
- PowerSync Collection
- powerSyncCollectionOptions
- createIndexedDB
- indexedDBCollectionOptions
- React Hooks
- useLiveQuery
AI/LLM: This documentation page is available in plain markdown format at/db/latest/docs/reference/functions/withCollectionConfigFactory.md
withCollectionConfigFactory
ts
function withCollectionConfigFactory<TConfig>(
config,
factory,
claim?): CollectionConfigWithFactory<TConfig>;Defined in: packages/db/src/client.ts:96
Adds a fresh-config materializer to an adapter options object.
Adapter option creators should use this so a module-scoped descriptor can be materialized safely by more than one DbClient.
Type Parameters#
TConfig#
TConfig extends AnyCollectionConfig
Parameters#
config#
TConfig
factory#
(client) => TConfig
claim?#
() => void | () => void
Returns#
CollectionConfigWithFactory<TConfig>