mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
Removed inappropriate overloads in 'jquery.gridster' and 'royalslider', fixed JQuery overload for 'data' in 'jquery'.
This commit is contained in:
parent
1ba21f73e4
commit
1d6c126e8e
@ -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>();
|
||||
|
||||
4
jquery.gridster/gridster.d.ts
vendored
4
jquery.gridster/gridster.d.ts
vendored
@ -248,7 +248,3 @@ interface Gridster {
|
||||
**/
|
||||
disable(): Gridster;
|
||||
}
|
||||
|
||||
interface JQuery {
|
||||
data(key: "gridster"): Gridster;
|
||||
}
|
||||
12
jquery/jquery.d.ts
vendored
12
jquery/jquery.d.ts
vendored
@ -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.
|
||||
*/
|
||||
|
||||
@ -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
|
||||
|
||||
2
royalslider/royalslider.d.ts
vendored
2
royalslider/royalslider.d.ts
vendored
@ -493,6 +493,4 @@ interface JQuery {
|
||||
* @param options The options
|
||||
*/
|
||||
royalSlider(options?: RoyalSlider.RoyalSliderOptions): JQuery;
|
||||
|
||||
data(key: "royalSlider"): RoyalSlider.RoyalSlider;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user