UNPKG

@aws-amplify/core

Version:

Core category of aws-amplify

30 lines (29 loc) • 820 B
import { SyncStorage } from '../types'; /** * @internal */ export declare class SyncKeyValueStorage implements SyncStorage { #private; constructor(storage?: Storage); /** * This is used to set a specific item in storage * @param {string} key - the key for the item * @param {object} value - the value */ setItem(key: string, value: string): void; /** * This is used to get a specific key from storage * @param {string} key - the key for the item * @returns {string | null} the data item */ getItem(key: string): string | null; /** * This is used to remove an item from storage * @param {string} key - the key being set */ removeItem(key: string): void; /** * This is used to clear the storage */ clear(): void; }