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/withChangeTracking.md
withChangeTracking
ts
function withChangeTracking<T>(target, callback): Record<string | symbol, unknown>;Defined in: packages/db/src/proxy.ts:862
Creates a proxy for an object, passes it to a callback function, and returns the changes made by the callback
Type Parameters#
T#
T extends object
Parameters#
target#
T
The object to proxy
callback#
(proxy) => void
Function that receives the proxy and can make changes to it
Returns#
Record<string | symbol, unknown>
The changes made to the object