import type IndexProvider from '../types/IndexProvider';
import type { BaseItem } from './types';
/**
 * creates an index for a specific field but uses an external map to store the index
 * @param field name of the field
 * @param index the external map to use for the index
 * @returns an index provider to pass to the `indices` option of the collection constructor
 */
export declare function createExternalIndex<T extends BaseItem<I> = BaseItem, I = any>(field: string, index: Map<string | undefined | null, Set<number>>): IndexProvider<T, I>;
/**
 * creates an index for a specific field
 * @param field name of the field
 * @returns an index provider to pass to the `indices` option of the collection constructor
 */
export default function createIndex<T extends BaseItem<I> = BaseItem, I = any>(field: string): IndexProvider<T, I>;
