storage-ts
Version:
sessionStorage & localStorage
21 lines (12 loc) • 499 B
TypeScript
interface StorageStatic {
clear(type?: string): void;
get(key: string, type?: string): string | null;
getItem(key: string, type?: string): string | null;
key(index: number, type?: string): string | null;
length(type?: string): number;
removeItem(key: string, type?: string): void;
set(key: string, data: string, type?: string): void;
setItem(key: string, data: string, type?: string): void;
}
declare const Storage: StorageStatic;
export default Storage;