Skip to content

Commit e064c72

Browse files
docs: regenerate API documentation (#1449)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent e29aab3 commit e064c72

290 files changed

Lines changed: 6559 additions & 1558 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/framework/angular/reference/interfaces/InjectLiveQueryResult.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Contains reactive signals for the query state and data.
2222

2323
```ts
2424
collection: Signal<
25-
| Collection<{ [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }, string | number, {
26-
}, StandardSchemaV1<unknown, unknown>, { [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>
25+
| Collection<{ [K in string | number | symbol]: ResultValue<TContext>[K] }, string | number, {
26+
}, StandardSchemaV1<unknown, unknown>, { [K in string | number | symbol]: ResultValue<TContext>[K] }>
2727
| null>;
2828
```
2929

@@ -108,7 +108,7 @@ A signal indicating whether the collection is ready
108108
### state
109109

110110
```ts
111-
state: Signal<Map<string | number, { [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>>;
111+
state: Signal<Map<string | number, { [K in string | number | symbol]: ResultValue<TContext>[K] }>>;
112112
```
113113

114114
Defined in: [index.ts:34](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L34)

docs/framework/react/reference/functions/useLiveQuery.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Object with reactive data, state, and status information
4444
#### collection
4545

4646
```ts
47-
collection: Collection<{ [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }, string | number, {
47+
collection: Collection<{ [K in string | number | symbol]: ResultValue<TContext>[K] }, string | number, {
4848
}>;
4949
```
5050

@@ -93,7 +93,7 @@ isReady: boolean;
9393
#### state
9494

9595
```ts
96-
state: Map<string | number, { [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>;
96+
state: Map<string | number, { [K in string | number | symbol]: ResultValue<TContext>[K] }>;
9797
```
9898

9999
#### status
@@ -202,8 +202,8 @@ Object with reactive data, state, and status information
202202

203203
```ts
204204
collection:
205-
| Collection<{ [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }, string | number, {
206-
}, StandardSchemaV1<unknown, unknown>, { [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>
205+
| Collection<{ [K in string | number | symbol]: ResultValue<TContext>[K] }, string | number, {
206+
}, StandardSchemaV1<unknown, unknown>, { [K in string | number | symbol]: ResultValue<TContext>[K] }>
207207
| undefined;
208208
```
209209

@@ -253,7 +253,7 @@ isReady: boolean;
253253

254254
```ts
255255
state:
256-
| Map<string | number, { [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>
256+
| Map<string | number, { [K in string | number | symbol]: ResultValue<TContext>[K] }>
257257
| undefined;
258258
```
259259

@@ -344,7 +344,7 @@ Create a live query using a query function
344344
#### queryFn
345345

346346
(`q`) =>
347-
\| `LiveQueryCollectionConfig`\<`TContext`, \{ \[K in string \| number \| symbol\]: (TContext\["result"\] extends object ? any\[any\] : TContext\["hasJoins"\] extends true ? TContext\["schema"\] : TContext\["schema"\]\[TContext\["fromSourceName"\]\])\[K\] \} & `object`\>
347+
\| `LiveQueryCollectionConfig`\<`TContext`, `RootQueryResult`\<`TContext`\>\>
348348
\| `null`
349349
\| `undefined`
350350

@@ -366,8 +366,8 @@ Object with reactive data, state, and status information
366366

367367
```ts
368368
collection:
369-
| Collection<{ [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }, string | number, {
370-
}, StandardSchemaV1<unknown, unknown>, { [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>
369+
| Collection<{ [K in string | number | symbol]: ResultValue<TContext>[K] }, string | number, {
370+
}, StandardSchemaV1<unknown, unknown>, { [K in string | number | symbol]: ResultValue<TContext>[K] }>
371371
| undefined;
372372
```
373373

@@ -417,7 +417,7 @@ isReady: boolean;
417417

418418
```ts
419419
state:
420-
| Map<string | number, { [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>
420+
| Map<string | number, { [K in string | number | symbol]: ResultValue<TContext>[K] }>
421421
| undefined;
422422
```
423423

@@ -690,7 +690,7 @@ Create a live query using a query function
690690

691691
(`q`) =>
692692
\| `QueryBuilder`\<`TContext`\>
693-
\| `LiveQueryCollectionConfig`\<`TContext`, \{ \[K in string \| number \| symbol\]: (TContext\["result"\] extends object ? any\[any\] : TContext\["hasJoins"\] extends true ? TContext\["schema"\] : TContext\["schema"\]\[TContext\["fromSourceName"\]\])\[K\] \} & `object`\>
693+
\| `LiveQueryCollectionConfig`\<`TContext`, `RootQueryResult`\<`TContext`\>\>
694694
\| `Collection`\<`TResult`, `TKey`, `TUtils`, `StandardSchemaV1`\<`unknown`, `unknown`\>, `TResult`\>
695695
\| `null`
696696
\| `undefined`
@@ -714,8 +714,8 @@ Object with reactive data, state, and status information
714714
```ts
715715
collection:
716716
| Collection<TResult, TKey, TUtils, StandardSchemaV1<unknown, unknown>, TResult>
717-
| Collection<{ [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }, string | number, {
718-
}, StandardSchemaV1<unknown, unknown>, { [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>
717+
| Collection<{ [K in string | number | symbol]: ResultValue<TContext>[K] }, string | number, {
718+
}, StandardSchemaV1<unknown, unknown>, { [K in string | number | symbol]: ResultValue<TContext>[K] }>
719719
| undefined;
720720
```
721721

@@ -765,7 +765,7 @@ isReady: boolean;
765765

766766
```ts
767767
state:
768-
| Map<string | number, { [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>
768+
| Map<string | number, { [K in string | number | symbol]: ResultValue<TContext>[K] }>
769769
| Map<TKey, TResult>
770770
| undefined;
771771
```
@@ -875,7 +875,7 @@ Object with reactive data, state, and status information
875875
#### collection
876876

877877
```ts
878-
collection: Collection<{ [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }, string | number, {
878+
collection: Collection<{ [K in string | number | symbol]: ResultValue<TContext>[K] }, string | number, {
879879
}>;
880880
```
881881

@@ -924,7 +924,7 @@ isReady: boolean;
924924
#### state
925925

926926
```ts
927-
state: Map<string | number, { [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>;
927+
state: Map<string | number, { [K in string | number | symbol]: ResultValue<TContext>[K] }>;
928928
```
929929

930930
#### status
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
id: useLiveQueryEffect
3+
title: useLiveQueryEffect
4+
---
5+
6+
# Function: useLiveQueryEffect()
7+
8+
```ts
9+
function useLiveQueryEffect<TRow, TKey>(config, deps): void;
10+
```
11+
12+
Defined in: [useLiveQueryEffect.ts:30](https://github.com/TanStack/db/blob/main/packages/react-db/src/useLiveQueryEffect.ts#L30)
13+
14+
React hook for creating a reactive effect that fires handlers when rows
15+
enter, exit, or update within a query result.
16+
17+
The effect is created on mount and disposed on unmount. If `deps` change,
18+
the previous effect is disposed and a new one is created.
19+
20+
## Type Parameters
21+
22+
### TRow
23+
24+
`TRow` *extends* `object` = `Record`\<`string`, `unknown`\>
25+
26+
### TKey
27+
28+
`TKey` *extends* `string` \| `number` = `string` \| `number`
29+
30+
## Parameters
31+
32+
### config
33+
34+
`EffectConfig`\<`TRow`, `TKey`\>
35+
36+
### deps
37+
38+
`DependencyList` = `[]`
39+
40+
## Returns
41+
42+
`void`
43+
44+
## Example
45+
46+
```tsx
47+
function ChatComponent() {
48+
useLiveQueryEffect(
49+
{
50+
query: (q) => q.from({ msg: messages }).where(({ msg }) => eq(msg.role, 'user')),
51+
skipInitial: true,
52+
onEnter: async (event) => {
53+
await generateResponse(event.value)
54+
},
55+
},
56+
[]
57+
)
58+
59+
return <div>...</div>
60+
}
61+
```

docs/framework/react/reference/functions/useLiveSuspenseQuery.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Object with reactive data and state - data is guaranteed to be defined
4444
#### collection
4545

4646
```ts
47-
collection: Collection<{ [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }, string | number, {
47+
collection: Collection<{ [K in string | number | symbol]: ResultValue<TContext>[K] }, string | number, {
4848
}>;
4949
```
5050

@@ -57,7 +57,7 @@ data: InferResultType<TContext>;
5757
#### state
5858

5959
```ts
60-
state: Map<string | number, { [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>;
60+
state: Map<string | number, { [K in string | number | symbol]: ResultValue<TContext>[K] }>;
6161
```
6262

6363
### Throws
@@ -198,7 +198,7 @@ Object with reactive data and state - data is guaranteed to be defined
198198
#### collection
199199

200200
```ts
201-
collection: Collection<{ [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }, string | number, {
201+
collection: Collection<{ [K in string | number | symbol]: ResultValue<TContext>[K] }, string | number, {
202202
}>;
203203
```
204204

@@ -211,7 +211,7 @@ data: InferResultType<TContext>;
211211
#### state
212212

213213
```ts
214-
state: Map<string | number, { [K in string | number | symbol]: (TContext["result"] extends object ? any[any] : TContext["hasJoins"] extends true ? TContext["schema"] : TContext["schema"][TContext["fromSourceName"]])[K] }>;
214+
state: Map<string | number, { [K in string | number | symbol]: ResultValue<TContext>[K] }>;
215215
```
216216

217217
### Throws

docs/framework/react/reference/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ title: "@tanstack/react-db"
1515

1616
- [useLiveInfiniteQuery](functions/useLiveInfiniteQuery.md)
1717
- [useLiveQuery](functions/useLiveQuery.md)
18+
- [useLiveQueryEffect](functions/useLiveQueryEffect.md)
1819
- [useLiveSuspenseQuery](functions/useLiveSuspenseQuery.md)
1920
- [usePacedMutations](functions/usePacedMutations.md)

0 commit comments

Comments
 (0)