From efd78f5100791441ea7215c9aa45f52d0ca75b2f Mon Sep 17 00:00:00 2001 From: NN Date: Mon, 12 Jan 2015 17:26:40 +0200 Subject: [PATCH] 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 --- jquery.cookie/jquery.cookie.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jquery.cookie/jquery.cookie.d.ts b/jquery.cookie/jquery.cookie.d.ts index 3439382c3..64dcc56a6 100644 --- a/jquery.cookie/jquery.cookie.d.ts +++ b/jquery.cookie/jquery.cookie.d.ts @@ -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; -} \ No newline at end of file +}