@nlabs/arkhamjs-storage-browser
Version:
Browser storage for ArkhamJS with enhanced performance and modern ESNext features
22 lines • 719 B
TypeScript
export interface BrowserStorageOptions {
readonly type?: 'local' | 'session';
readonly prefix?: string;
readonly compression?: boolean;
readonly maxSize?: number;
readonly ttl?: number;
}
export interface StorageData {
readonly value: any;
readonly timestamp: number;
readonly ttl?: number;
}
export type StorageType = 'local' | 'session';
export interface StorageInterface {
readonly length: number;
readonly getItem: (key: string) => string | null;
readonly setItem: (key: string, value: string) => void;
readonly removeItem: (key: string) => void;
readonly clear: () => void;
readonly key: (index: number) => string | null;
}
//# sourceMappingURL=main.d.ts.map