Files
DefinitelyTyped/jquery.cookie/jquery.cookie.d.ts
T
BreeeZe f0fef408cf The expires option can be either a number or a Date object. (https://github.com/carhartl/jquery-cookie#expires)
Since there is no option to define both for a property it should be defined as any.
2012-11-27 22:12:28 +01:00

32 lines
872 B
TypeScript

// 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-1.8.d.ts" />
interface JQueryCookieOptions {
expires?: any;
path?: string;
domain?: string;
secure?: bool;
}
interface JQueryCookieStatic {
raw?: bool;
json?: bool;
(name: string): 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): bool;
removeCookie(name: string, options: JQueryCookieOptions): bool;
}