mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-26 06:05:54 +08:00
Specify structure $.fn.serializeArray() return val
$.fn.serializeArray returns an array of { name: string; value: string; }
elements. This patch declares that type explicitly, instead of Object[].
This commit is contained in:
10
jquery/jquery.d.ts
vendored
10
jquery/jquery.d.ts
vendored
@@ -629,6 +629,14 @@ interface JQueryCoordinates {
|
||||
top: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Elements in the array returned by serializeArray()
|
||||
*/
|
||||
interface JQuerySerializeArrayElement {
|
||||
name: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
interface JQueryAnimationOptions {
|
||||
/**
|
||||
* A string or number determining how long the animation will run.
|
||||
@@ -1321,7 +1329,7 @@ interface JQuery {
|
||||
/**
|
||||
* Encode a set of form elements as an array of names and values.
|
||||
*/
|
||||
serializeArray(): Object[];
|
||||
serializeArray(): JQuerySerializeArrayElement[];
|
||||
|
||||
/**
|
||||
* Adds the specified class(es) to each of the set of matched elements.
|
||||
|
||||
Reference in New Issue
Block a user