UNPKG

@nu-art/thunder

Version:

Thunder - React & Typescript based frontend framework

22 lines (21 loc) 790 B
/** * Created by tacb0ss on 27/07/2018. */ import { Module } from "@nu-art/ts-common"; export declare class StorageModule_Class extends Module<void> { private cache; set(key: string, value: string | number | object): void; delete(key: string): void; clearCache(key: string): void; get(key: string, defaultValue?: string | number | object): string | number | object | null; } export declare const StorageModule: StorageModule_Class; export declare class StorageKey<ValueType = string | number | object> { private readonly key; constructor(key: string); get(defaultValue?: ValueType): ValueType; patch(value: ValueType extends object ? Partial<ValueType> : ValueType): void; set(value: ValueType): void; delete(): void; clearCache(): void; }