forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
storejs.d.ts
21 lines (18 loc) · 656 Bytes
/
storejs.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Type definitions for store.js
// Project: https://github.com/marcuswestin/store.js/
// Definitions by: Vincent Bortone <https://github.com/vbortone/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// store.js exposes a simple API for cross browser local storage
interface StoreJSStatic {
set(key: string, value: any): any;
get(key: string): any;
remove(key: string): void;
clear(): void;
enabled: boolean;
disabled: boolean;
transact(key: string, defaultValue: any, transactionFn?: (val: any) => void): void;
getAll(): any;
serialize(value: any): string;
deserialize(value: string): any;
}
declare var store: StoreJSStatic;