UNPKG

@diffusionstudio/core-v4

Version:

2D motion graphics and video rendering engine

13 lines (12 loc) 496 B
import { StorageItem } from './storage-item'; export type Deserializer<T> = (data: any) => Promise<T> | T; export declare class Store { readonly storageEngine: Storage; readonly namespace?: string; constructor(namespace?: string, storageEngine?: Storage); define<T>(key: string, defaultValue: T, deserializer?: Deserializer<T>): StorageItem<T>; set<T>(key: string, value: T): void; get<T>(key: string): T | null; remove(key: string): void; private getStorageId; }