UNPKG

@qodalis/angular-cli

Version:

A lightweight and flexible command-line interface (CLI) tool designed to streamline workflows and automate tasks for developers.

39 lines (38 loc) 1.31 kB
import { ICliKeyValueStore } from '@qodalis/cli-core'; import * as i0 from "@angular/core"; export declare class CliKeyValueStore implements ICliKeyValueStore { private dbName; private storeName; private db; constructor(); /** * Initializes the IndexedDB instance. */ initialize(): Promise<void>; /** * Retrieves a value by key. * @param key - The key to retrieve the value for. * @returns A promise resolving to the value or undefined if not found. */ get<T = any>(key: string): Promise<T | undefined>; /** * Sets a key-value pair in the store. * @param key - The key to set. * @param value - The value to store. * @returns A promise resolving when the value is stored. */ set(key: string, value: any): Promise<void>; /** * Removes a key-value pair by key. * @param key - The key to remove. * @returns A promise resolving when the key is removed. */ remove(key: string): Promise<void>; /** * Clears all key-value pairs from the store. * @returns A promise resolving when the store is cleared. */ clear(): Promise<void>; static ɵfac: i0.ɵɵFactoryDeclaration<CliKeyValueStore, never>; static ɵprov: i0.ɵɵInjectableDeclaration<CliKeyValueStore>; }