mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Added possibility to add number or number[] to .val()
This commit is contained in:
@@ -3128,6 +3128,8 @@ function test_val() {
|
||||
$("#single").val("Single2");
|
||||
$("#multiple").val(["Multiple2", "Multiple3"]);
|
||||
$("input").val(["check1", "check2", "radio1"]);
|
||||
$("input").val(1);
|
||||
$("input").val([1, 2, 3]);
|
||||
}
|
||||
|
||||
function test_selector() {
|
||||
|
||||
Vendored
+1
-1
@@ -1365,7 +1365,7 @@ interface JQuery {
|
||||
*
|
||||
* @param value A string of text or an array of strings corresponding to the value of each matched element to set as selected/checked.
|
||||
*/
|
||||
val(value: string|string[]): JQuery;
|
||||
val(value: string|string[]|number|number[]): JQuery;
|
||||
/**
|
||||
* Set the value of each element in the set of matched elements.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user