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

IndexOptions.md

52 lines1.2 KB

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