import { IRecordID } from '../../shared/types.js'; import { IIndexedDBStore } from './types.js'; /** * Indexed DB Store * Object in charge of charge of interacting with the Browser's IndexedDB implementation. */ declare class IndexedDBStore implements IIndexedDBStore { readonly id: string; private __isCompatible; private readonly __tempMemory; constructor(id: string); /** * Checks if the storage mechanism is supported by the browser. If so, it sets the __isCompatible * prop to true. */ private __checkCompatibility; /** * Runs the tests to check if the storage mechanism is supported by the browser and returns true * if it is. * @returns Promise */ isCompatible(): Promise; /** * Retrieves a record by ID. If no ID is provided, it retrieves the data stored at the root of the * store. * @param id? * @returns Promise */ get(id?: IRecordID): Promise; /** * Writes data on a record based on its ID. If no ID is provided, it writes at the root of the * store. * @param id * @param data * @returns Promise */ set(id: IRecordID, data: T): Promise; /** * Deletes the record based on its ID. If no ID is provided, it deletes the root of the store. * @param id? * @returns Promise */ del(id?: IRecordID): Promise; } export { type IIndexedDBStore, IndexedDBStore, };