Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/persistence / dist / OneStorage.d.ts
Size: Mime:
/**
 * @todo replace oneStorage everywhere
 */
import indexdb from './adapters/indexdb';
import ls from './adapters/local-storage';
import inMemory from './adapters/in-memory';
import { Serializable } from './deps/stringify';
/**
 * keys, values...
 * @alias OmniStorage
 *
 * @todo only use the adapters (means use this.ls > ls)
 *       so they can be overwritten
 */
declare class OneStorage {
    inMemory: typeof inMemory;
    indexdb: typeof indexdb;
    ls: typeof ls;
    constructor();
    get<Value extends Serializable = Serializable>(key: string): Value;
    /**
     * @todo is it faster to "graphql-client-cache" ignore if it always fills?
     */
    set(key: string, value: Serializable): Promise<void> | Promise<number>;
    has(key: string): boolean;
    remove(key: string): Promise<any>;
    clear(): Promise<any>;
    readonly length: number;
}
export { OneStorage };
export default OneStorage;