Skip to content
Source
Sign inSign up
TanStack/db
Open History to see the last commit

createArrayChangeProxy.md

48 lines707 Bytes

1---
2id: createArrayChangeProxy
3title: createArrayChangeProxy
4---
5​
6```ts
7function createArrayChangeProxy<T>(targets): object;
8```
9​
10Defined in: [packages/db/src/proxy.ts:840](https://github.com/TanStack/db/blob/main/packages/db/src/proxy.ts#L840)
11​
12Creates proxies for an array of objects and tracks changes to each
13​
14## Type Parameters
15​
16### T
17​
18`T` *extends* `object`
19​
20## Parameters
21​
22### targets
23​
24`T`[]
25​
26Array of objects to proxy
27​
28## Returns
29​
30`object`
31​
32An object containing the array of proxies and a function to get all changes
33​
34### getChanges()
35​
36```ts
37getChanges: () => Record<string | symbol, unknown>[];
38```
39​
40#### Returns
41​
42`Record`\<`string` \| `symbol`, `unknown`\>[]
43​
44### proxies
45​
46```ts
47proxies: T[];
48```