UNPKG

@mini-markdown-rc/editor

Version:
11 lines (10 loc) 296 B
/** * localStorage 包装器 */ export interface SafeStorage { getItem: <T = string>(key: string) => T | null; setItem: <T = string>(key: string, value: T) => void; removeItem: (key: string) => void; clear: () => void; } export declare function safeLocalStorage(): SafeStorage;