UNPKG

@signaldb/core

Version:

SignalDB is a client-side database that provides a simple MongoDB-like interface to the data with first-class typescript support to achieve an optimistic UI. Data persistence can be achieved by using storage providers that store the data through a JSON in

9 lines (8 loc) 410 B
import type { BaseItem } from './Collection'; import type IndexProvider from './types/IndexProvider'; /** * Creates an IndexProvider based on the given definition. * @param definition - The definition of the IndexProvider. * @returns The created IndexProvider. */ export default function createIndexProvider<T extends BaseItem<I> = BaseItem, I = any>(definition: IndexProvider<T, I>): IndexProvider<T, I>;