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

Function withArrayChangeTracking

packages/db/src/proxy.ts:1171–1180  ·  view source on GitHub ↗
(
  targets: Array<T>,
  callback: (proxies: Array<T>) => void,
)

Source from the content-addressed store, hash-verified

1169 * @returns Array of changes made to each object
1170 */
1171export function withArrayChangeTracking<T extends object>(
1172 targets: Array<T>,
1173 callback: (proxies: Array<T>) => void,
1174): Array<Record<string | symbol, unknown>> {
1175 const { proxies, getChanges } = createArrayChangeProxy(targets)
1176
1177 callback(proxies)
1178
1179 return getChanges()
1180}

Callers 2

updateMethod · 0.90
proxy.test.tsFile · 0.90

Calls 1

createArrayChangeProxyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…