Framework
defineIndex()
Function: defineIndex()
function defineIndex<T>(provider): IndexProvider<T>Define a custom index provider.
Type Parameters
| Type Parameter | Default type |
|---|---|
T | unknown |
Parameters
| Parameter | Type |
|---|---|
provider | IndexProvider<T> |
Returns
Example
export const trieIndex = defineIndex({
create: (options) => new TrieIndex(options),
operators: ['prefixMatch', 'autocomplete'],
})