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

createarraychangeproxy.md

50 lines816 Bytes

1---
2id: createArrayChangeProxy
3title: createArrayChangeProxy
4---
5​
6<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7​
8# Function: createArrayChangeProxy()
9​
10```ts
11function createArrayChangeProxy<T>(targets): object
12```
13​
14Defined in: [packages/db/src/proxy.ts:964](https://github.com/TanStack/db/blob/main/packages/db/src/proxy.ts#L964)
15​
16Creates proxies for an array of objects and tracks changes to each
17​
18## Type Parameters
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```