/** * Different persistence mechanisms (e.g. localStorage, IndexedDB) may support different key types. This type should be * a valid key across all concrete Persistence implementations. */ export type ValidKey = string | number; export declare const isValidKey: (key: unknown) => key is ValidKey; /** * The abstract Persistence class defines an async interface for interacting with persistent client-side storage. This * is modeled as a simple key/value store. * * Subclasses may be implemented to support a variety of persistence mechanisms – e.g. localStorage, IndexedDB, etc. */ export declare abstract class Persistence { abstract size: number; abstract retrieve(key: ValidKey): Promise; abstract retrieveAll(): Promise>; abstract remove(key: ValidKey): Promise; abstract removeAll(): Promise; /** * Persistence implementations must be capable of generating unique keys, or accepting a unique key from the * caller. */ abstract store(value: T): Promise; abstract store(key: ValidKey, value: T): Promise; } //# sourceMappingURL=Persistence.d.ts.map