UNPKG

zustand-persist

Version:
16 lines (15 loc) 631 B
interface AnyStorage { setItem: (key: string, value: string) => Promise<void> | void; getItem: (key: string) => Promise<string | null> | string | null; removeItem: (key: string) => Promise<void> | void; } export interface KeeperOption { storage: AnyStorage; rootKey?: string; } export declare function configureKeeper(option: KeeperOption): void; export declare function getItem(key: string): Promise<any>; export declare function setItem(key: string, value: string): Promise<void>; export declare function removeItem(key: string): Promise<void>; export declare function removeRoot(): Promise<void>; export {};