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

createArrayChangeProxy.md

50 lines747 Bytes

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