UNPKG

@hocgin/taro-kit

Version:
19 lines (18 loc) 819 B
import { StorageKitType } from "@hocgin/hkit"; export declare class StorageKit<Key = string, Value = any> extends StorageKitType<Key, Value> { static create<Key, Value>(): StorageKit<Key, Value>; setSync(key: Key, value: Value): void; getSync(key?: Key): Value; getBatch(keys: Key[] | Key): Promise<Map<Key, Value>>; remove(key: Key): Promise<void>; removeBatch(keys: Key[] | Key): Promise<void>; setBatch(items: Map<Key, Value>): Promise<void>; setItem(key: string, value: any): void; getItem(key: string): any | undefined; setStorageSync: (k: any, v: any) => void; getStorageSync: (k: any) => any; removeStorageSync: (k: any) => void; } export { StorageKey } from './use'; import { StorageKey } from './use'; export declare let storageKit: StorageKit<StorageKey, any>;