Removed inappropriate overloads in 'jquery.gridster' and 'royalslider', fixed JQuery overload for 'data' in 'jquery'.

This commit is contained in:
Daniel Rosenwasser 2015-08-24 18:06:19 -07:00
parent 1ba21f73e4
commit 1d6c126e8e
5 changed files with 8 additions and 14 deletions

View File

@ -16,7 +16,7 @@ var options: GridsterOptions = {
}
};
let gridster: Gridster = $('.gridster ul').gridster(options).data('gridster');
var gridster: Gridster = $('.gridster ul').gridster(options).data('gridster');
gridster.add_widget('<li class="new">The HTML of the widget...</li>', 2, 1);
gridster.remove_widget($('gridster li').eq(3).get(0));
var json = gridster.serialize<SerializeData>();

View File

@ -248,7 +248,3 @@ interface Gridster {
**/
disable(): Gridster;
}
interface JQuery {
data(key: "gridster"): Gridster;
}

12
jquery/jquery.d.ts vendored
View File

@ -1545,18 +1545,18 @@ interface JQuery {
* @param value The new data value; it can be any Javascript type including Array or Object.
*/
data(key: string, value: any): JQuery;
/**
* Store arbitrary data associated with the matched elements.
*
* @param obj An object of key-value pairs of data to update.
*/
data(obj: { [key: string]: any; }): JQuery;
/**
* Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute.
*
* @param key Name of the data stored.
*/
data(key: string): any;
/**
* Store arbitrary data associated with the matched elements.
*
* @param obj An object of key-value pairs of data to update.
*/
data(obj: { [key: string]: any; }): JQuery;
/**
* Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute.
*/

View File

@ -100,7 +100,7 @@ jQuery(document).ready(function () {
// Another example: $(".royalSlider").royalSlider('goTo', 3);
// But it's recommended to get instance once if you have many calls:
var slider = $(".royalSlider").royalSlider().data('royalSlider');
var slider: RoyalSlider.RoyalSlider = $(".royalSlider").royalSlider().data('royalSlider');
slider.goTo(3); // go to slide with id
slider.next(); // next slide

View File

@ -493,6 +493,4 @@ interface JQuery {
* @param options The options
*/
royalSlider(options?: RoyalSlider.RoyalSliderOptions): JQuery;
data(key: "royalSlider"): RoyalSlider.RoyalSlider;
}