1 | import Cookies, { CookieSetOptions } from 'universal-cookie';
|
2 | type Store = Record<string, string>;
|
3 | type Context = {
|
4 | req?: any;
|
5 | };
|
6 | export declare class UniversalStorage implements Storage {
|
7 | cookies: Cookies;
|
8 | store: Store;
|
9 | constructor(context?: Context);
|
10 | get length(): number;
|
11 | clear(): void;
|
12 | getItem(key: keyof Store): string;
|
13 | protected getLocalItem(key: keyof Store): string;
|
14 | protected getUniversalItem(key: keyof Store): any;
|
15 | key(index: number): string;
|
16 | removeItem(key: string): void;
|
17 | protected removeLocalItem(key: keyof Store): void;
|
18 | protected removeUniversalItem(key: keyof Store): void;
|
19 | setItem(key: keyof Store, value: string): void;
|
20 | protected setLocalItem(key: keyof Store, value: string): void;
|
21 | protected setUniversalItem(key: keyof Store, value: string, options?: CookieSetOptions): void;
|
22 | }
|
23 | export {};
|