mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-22 11:40:10 +08:00
Support converter option
jquery.cookie supports converter function in the second argument: https://github.com/carhartl/jquery-cookie Example for parsing a value into a number: $.cookie('foo', '42'); $.cookie('foo', Number); // => 42
This commit is contained in:
Vendored
+3
-1
@@ -21,6 +21,8 @@ interface JQueryCookieStatic {
|
||||
(name: string): any;
|
||||
(name: string, value: string): void;
|
||||
(name: string, value: string, options: JQueryCookieOptions): void;
|
||||
(name: string, converter: (value: string) => any): void;
|
||||
(name: string, converter: (value: string) => any, options: JQueryCookieOptions): void;
|
||||
(name: string, value: any): void;
|
||||
(name: string, value: any, options: JQueryCookieOptions): void;
|
||||
}
|
||||
@@ -30,4 +32,4 @@ interface JQueryStatic {
|
||||
|
||||
removeCookie(name: string): boolean;
|
||||
removeCookie(name: string, options: JQueryCookieOptions): boolean;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user