Add JQueryCssProperties interface for $.css(properties: object)

Adding JQueryCssProperties interface and changing the signature for
$.css(properties: object) to $.css(properties: JQueryCssProperties)
This commit is contained in:
Mike Dvorscak
2017-05-18 11:40:32 -05:00
parent 6b64c4f2a1
commit cdca61035a
+8 -1
View File
@@ -679,6 +679,13 @@ interface JQueryCoordinates {
top: number;
}
/**
* The interface used to specify the properties parameter in css()
*/
interface JQueryCssProperties {
[propertyName: string]: string | number | Function;
}
/**
* Elements in the array returned by serializeArray()
*/
@@ -1687,7 +1694,7 @@ interface JQuery {
* @param properties An object of property-value pairs to set.
* @see {@link https://api.jquery.com/css/#css-properties}
*/
css(properties: Object): JQuery;
css(properties: JQueryCssProperties): JQuery;
/**
* Get the current computed height for the first element in the set of matched elements.