import type { IndexSchema } from "./IndexSchema"; import { TableIndexType } from "./Table"; export interface TableIndex { schema: IndexSchema; items?: any; indexType: TableIndexType; getWithIndexKey(indexKey: any): ItemType; getListWithIndexKey(indexKey: any): ItemType[]; hasIndexKey(indexKey: any): boolean; getAllAsList(): ItemType[]; getAsValue(): any; iterateAll(): IterableIterator; iterateWithIndexKey(indexKey: any): IterableIterator; deleteAll(): void; deleteAllWithIndexKey(indexKey: any): void; deleteItem(indexKey: any, matchesItem: (existingItem: ItemType) => Boolean): void; getCount(): number; insert(item: any): void; updateAll(updateCallbackFn: (item: ItemType) => ItemType): void; updateWithIndexKey(indexKey: any, updateCallbackFn: (item: ItemType) => ItemType): void; replaceItemUsingRefEquality(indexKey: any, oldItem: ItemType, newItem: ItemType): void; deleteItemUsingRefEquality(oldIndexKey: any, item: ItemType): void; }