forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jquery.cookie.d.ts
34 lines (27 loc) · 1009 Bytes
/
jquery.cookie.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
// Type definitions for jQuery Cookie Plugin 1.3
// Project: https://github.com/carhartl/jquery-cookie
// Definitions by: Roy Goode <https://github.com/RoyGoode/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///<reference path="../jquery/jquery.d.ts" />
interface JQueryCookieOptions {
expires?: any;
path?: string;
domain?: string;
secure?: boolean;
}
interface JQueryCookieStatic {
raw?: boolean;
json?: boolean;
(): {[key:string]:string};
(name: string): any;
(name: string, converter: (value: string) => any): any;
(name: string, value: string): void;
(name: string, value: string, options: JQueryCookieOptions): void;
(name: string, value: any): void;
(name: string, value: any, options: JQueryCookieOptions): void;
}
interface JQueryStatic {
cookie?: JQueryCookieStatic;
removeCookie(name: string): boolean;
removeCookie(name: string, options: JQueryCookieOptions): boolean;
}