UNPKG

react-application-core

Version:

A react-based application core for the business applications.

38 lines (37 loc) 1.11 kB
import 'localforage'; import { AnyT } from '../../definitions.interface'; import { BaseStorage } from '../base-storage.service'; export declare class DatabaseStorage extends BaseStorage { private instance; /** * @stable [28.07.2019] * @param {string} prefix * @param {LocalForage} instance */ constructor(instance: LocalForage, prefix: string); /** * @stable [29.07.2019] * @param {string} key * @param {AnyT} value * @returns {Promise<boolean>} */ set(key: string, value: AnyT): Promise<boolean>; /** * @stable [28.07.2019] * @param {string} key * @returns {Promise<AnyT>} */ get(key: string): Promise<AnyT>; /** * @stable [28.07.2019] * @param {string} key * @param {boolean} noPrefix * @returns {Promise<boolean>} */ remove(key: string, noPrefix?: boolean): Promise<void>; /** * @stable [25.09.2019] * @param {(value: AnyT, key: string) => void} callback */ each(callback: (value: AnyT, key: string) => void): void; }