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

IndexOptions.md

50 lines1.2 KB

1---
2id: IndexOptions
3title: IndexOptions
4---
5​
6Defined in: [packages/db/src/indexes/index-options.ts:6](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/index-options.ts#L6)
7​
8Options for creating an index
9​
10## Type Parameters
11​
12### TIndexType
13​
14`TIndexType` *extends* [`IndexConstructor`](../type-aliases/IndexConstructor.md) = [`IndexConstructor`](../type-aliases/IndexConstructor.md)
15​
16## Properties
17​
18### indexType?
19​
20```ts
21optional indexType: TIndexType;
22```
23​
24Defined in: [packages/db/src/indexes/index-options.ts:12](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/index-options.ts#L12)
25​
26Index type to use (e.g., BasicIndex, BTreeIndex)
27​
28***
29​
30### name?
31​
32```ts
33optional name: string;
34```
35​
36Defined in: [packages/db/src/indexes/index-options.ts:10](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/index-options.ts#L10)
37​
38Optional name for the index
39​
40***
41​
42### options?
43​
44```ts
45optional options: TIndexType extends (id, expr, name?, options?) => any ? O : never;
46```
47​
48Defined in: [packages/db/src/indexes/index-options.ts:14](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/index-options.ts#L14)
49​
50Options passed to the index constructor