1 | import { ILogger } from '../common/logger';
|
2 | import { MessageService } from '../common/message-service';
|
3 | import { WindowService } from './window/window-service';
|
4 | export declare const StorageService: unique symbol;
|
5 |
|
6 |
|
7 |
|
8 | export interface StorageService {
|
9 | |
10 |
|
11 |
|
12 | setData<T>(key: string, data: T): Promise<void>;
|
13 | |
14 |
|
15 |
|
16 | getData<T>(key: string, defaultValue: T): Promise<T>;
|
17 | getData<T>(key: string): Promise<T | undefined>;
|
18 | }
|
19 | export declare class LocalStorageService implements StorageService {
|
20 | private storage;
|
21 | protected logger: ILogger;
|
22 | protected readonly messageService: MessageService;
|
23 | protected readonly windowService: WindowService;
|
24 | protected init(): void;
|
25 | setData<T>(key: string, data?: T): Promise<void>;
|
26 | getData<T>(key: string, defaultValue?: T): Promise<T | undefined>;
|
27 | protected prefix(key: string): string;
|
28 | private showDiskQuotaExceededMessage;
|
29 | |
30 |
|
31 |
|
32 |
|
33 | private testLocalStorage;
|
34 | private clearStorage;
|
35 | }
|
36 |
|
\ | No newline at end of file |