MCPcopy Index your code
hub / github.com/TanStack/db / withChangeTracking

Function withChangeTracking

packages/db/src/proxy.ts:1152–1161  ·  view source on GitHub ↗
(
  target: T,
  callback: (proxy: T) => void,
)

Source from the content-addressed store, hash-verified

1150 * @returns The changes made to the object
1151 */
1152export function withChangeTracking<T extends object>(
1153 target: T,
1154 callback: (proxy: T) => void,
1155): Record<string | symbol, unknown> {
1156 const { proxy, getChanges } = createChangeProxy(target)
1157
1158 callback(proxy)
1159
1160 return getChanges()
1161}
1162
1163/**
1164 * Creates proxies for an array of objects, passes them to a callback function,

Callers 2

updateMethod · 0.90
proxy.test.tsFile · 0.90

Calls 1

createChangeProxyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…