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

Function createArrayChangeProxy

packages/db/src/proxy.ts:1130–1142  ·  view source on GitHub ↗
(
  targets: Array<T>,
)

Source from the content-addressed store, hash-verified

1128 * @returns An object containing the array of proxies and a function to get all changes
1129 */
1130export function createArrayChangeProxy<T extends object>(
1131 targets: Array<T>,
1132): {
1133 proxies: Array<T>
1134 getChanges: () => Array<Record<string | symbol, unknown>>
1135} {
1136 const proxiesWithChanges = targets.map((target) => createChangeProxy(target))
1137
1138 return {
1139 proxies: proxiesWithChanges.map((p) => p.proxy),
1140 getChanges: () => proxiesWithChanges.map((p) => p.getChanges()),
1141 }
1142}
1143
1144/**
1145 * Creates a proxy for an object, passes it to a callback function,

Callers 2

proxy.test.tsFile · 0.90
withArrayChangeTrackingFunction · 0.85

Calls 2

createChangeProxyFunction · 0.85
mapMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…