forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathangular-cookies.d.ts
63 lines (55 loc) · 1.74 KB
/
angular-cookies.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// Type definitions for Angular JS 1.4 (ngCookies module)
// Project: http://angularjs.org
// Definitions by: Diego Vilar <http://github.com/diegovilar>, Anthony Ciccarello <http://github.com/aciccarello>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="angular.d.ts" />
declare module "angular-cookies" {
var _: string;
export = _;
}
/**
* ngCookies module (angular-cookies.js)
*/
declare module angular.cookies {
/**
* CookieService
* see http://docs.angularjs.org/api/ngCookies.$cookies
*/
interface ICookiesService {
[index: string]: any;
}
/**
* CookieStoreService
* see http://docs.angularjs.org/api/ngCookies.$cookieStore
*/
interface ICookiesService {
get(key: string): string;
getObject(key: string): any;
getAll(): any;
put(key: string, value: string, options?: any): void;
putObject(key: string, value: any, options?: any): void;
remove(key: string, options?: any): void;
}
/**
* CookieStoreService DEPRECATED
* see https://code.angularjs.org/1.2.26/docs/api/ngCookies/service/$cookieStore
*/
interface ICookieStoreService {
/**
* Returns the value of given cookie key
* @param key Id to use for lookup
*/
get(key: string): any;
/**
* Sets a value for given cookie key
* @param key Id for the value
* @param value Value to be stored
*/
put(key: string, value: any): void;
/**
* Remove given cookie
* @param key Id of the key-value pair to delete
*/
remove(key: string): void;
}
}