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

IndexDevModeConfig.md

56 lines1.3 KB

1---
2id: IndexDevModeConfig
3title: IndexDevModeConfig
4---
5​
6# Interface: IndexDevModeConfig
7​
8Defined in: [packages/db/src/indexes/index-registry.ts:15](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/index-registry.ts#L15)
9​
10## Properties
11​
12### collectionSizeThreshold
13​
14```ts
15collectionSizeThreshold: number;
16```
17​
18Defined in: [packages/db/src/indexes/index-registry.ts:19](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/index-registry.ts#L19)
19​
20Suggest indexes when collection has more than this many items
21​
22***
23​
24### enabled
25​
26```ts
27enabled: boolean;
28```
29​
30Defined in: [packages/db/src/indexes/index-registry.ts:17](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/index-registry.ts#L17)
31​
32Enable dev mode index suggestions
33​
34***
35​
36### onSuggestion
37​
38```ts
39onSuggestion: (suggestion) => void | null;
40```
41​
42Defined in: [packages/db/src/indexes/index-registry.ts:23](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/index-registry.ts#L23)
43​
44Custom handler for index suggestions
45​
46***
47​
48### slowQueryThresholdMs
49​
50```ts
51slowQueryThresholdMs: number;
52```
53​
54Defined in: [packages/db/src/indexes/index-registry.ts:21](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/index-registry.ts#L21)
55​
56Suggest indexes when queries take longer than this (ms)