forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ngstorage.d.ts
27 lines (21 loc) · 835 Bytes
/
ngstorage.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
// Type definitions for ngstorage 0.3.10
// Project: https://github.com/gsklee/ngStorage
// Definitions by: Jakub Pistek <https://github.com/kubiq>
// Definitions: https://github.com/kubiq/DefinitelyTyped
/// <reference path='../angularjs/angular.d.ts' />
declare namespace angular.storage {
export interface IStorageService {
$default(items: {}): IStorageService;
$reset(items?: {}): IStorageService;
$apply(): void;
$sync(): void;
[key: string]: any;
}
export interface IStorageProvider extends angular.IServiceProvider {
get<T>(key:string): T;
set<T>(key:string, value:T): T;
setKeyPrefix(prefix: string): void;
setSerializer(serializer: (value: any)=>string): void;
setDeserializer(deserializer: (value: string)=>any): void;
}
}