From c259dba094121a389b41c573d5000dda7bdf2092 Mon Sep 17 00:00:00 2001 From: John Reilly Date: Tue, 29 Apr 2014 13:52:47 +0100 Subject: [PATCH] jQuery: Add even more specific val setters --- jquery/jquery.d.ts | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/jquery/jquery.d.ts b/jquery/jquery.d.ts index 6d8551f44b..b378dfd0ac 100644 --- a/jquery/jquery.d.ts +++ b/jquery/jquery.d.ts @@ -1512,19 +1512,37 @@ interface JQuery { * * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments. */ - val(func: (index: number, value: string) => any): JQuery; + val(func: (index: number, value: string) => string): JQuery; /** * Set the value of each element in the set of matched elements. * * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments. */ - val(func: (index: number, value: string[]) => any): JQuery; + val(func: (index: number, value: string[]) => string): JQuery; /** * Set the value of each element in the set of matched elements. * * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments. */ - val(func: (index: number, value: number) => any): JQuery; + val(func: (index: number, value: number) => string): JQuery; + /** + * Set the value of each element in the set of matched elements. + * + * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments. + */ + val(func: (index: number, value: string) => string[]): JQuery; + /** + * Set the value of each element in the set of matched elements. + * + * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments. + */ + val(func: (index: number, value: string[]) => string[]): JQuery; + /** + * Set the value of each element in the set of matched elements. + * + * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments. + */ + val(func: (index: number, value: number) => string[]): JQuery; /** * Get the value of style properties for the first element in the set of matched elements.