-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathindex.d.ts
42 lines (35 loc) · 919 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
declare module "@egjs/persist" {
type persistValueType = any | null | undefined;
class Persist {
/**
* Clear all information in Persist
*/
public static clear(): void;
/**
* Return whether you need "Persist" module by checking the bfCache support of the current browser
*/
public static isNeeded(): boolean;
constructor(key: string);
/**
* Read value
*/
public get(path?: string): persistValueType;
/**
* Save value
*/
public set(path: string, value: persistValueType): this;
/**
* Remove value
*/
public remove(path: string): this;
}
export class PersistQuotaExceededError extends Error {
public name: string;
public storageType: "SessionStorage" | "LocalStorage" | "History" | "None";
public key: string;
public size: number;
}
export function updateDepth(type?: number): void;
export function replaceDepth(): void;
export default Persist;
}