mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 11:57:33 +08:00
22 lines
660 B
TypeScript
22 lines
660 B
TypeScript
// Type definitions for store.js
|
|
// Project: https://github.com/marcuswestin/store.js/
|
|
// Definitions by: Vincent Bortone <https://github.com/vbortone/>
|
|
// Definitions: https://github.com/DefinitelyTyped/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;
|