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

subscribechangesoptions.md

62 lines1.2 KB

1---
2id: SubscribeChangesOptions
3title: SubscribeChangesOptions
4---
5​
6<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7​
8# Interface: SubscribeChangesOptions\<T\>
9​
10Defined in: [packages/db/src/types.ts:573](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L573)
11​
12Options for subscribing to collection changes
13​
14## Type Parameters
15​
16• **T** *extends* `object` = `Record`\<`string`, `unknown`\>
17​
18## Properties
19​
20### includeInitialState?
21​
22```ts
23optional includeInitialState: boolean;
24```
25​
26Defined in: [packages/db/src/types.ts:577](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L577)
27​
28Whether to include the current state as initial changes
29​
30***
31​
32### where()?
33​
34```ts
35optional where: (row) => any;
36```
37​
38Defined in: [packages/db/src/types.ts:579](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L579)
39​
40Filter changes using a where expression
41​
42#### Parameters
43​
44##### row
45​
46`SingleRowRefProxy`\<`T`\>
47​
48#### Returns
49​
50`any`
51​
52***
53​
54### whereExpression?
55​
56```ts
57optional whereExpression: BasicExpression<boolean>;
58```
59​
60Defined in: [packages/db/src/types.ts:581](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L581)
61​
62Pre-compiled expression for filtering changes