I am using a jQuery UI slider in a TypeScript application, using TypeScript 0.9 and the latest jqueryui.d.ts definition file downloaded from DefinitelyTyped:
/// <reference path="jquery/jquery.d.ts" />
/// <reference path="jqueryui/jqueryui.d.ts" />
. . .
$("#sideRestitution").slider({
min: 0.0,
max: 1.0,
step: 0.01,
value: game.sideRestitution,
change: (event, ui) => {
game.sideRestitution = ui.value;
}
});
It works fine, but I cannot figure out how to use the widget in a 'typed' way: in the above code change is of type any. jqueryui.d.ts defines a Slider interface with the events and methods specific to the slider widget, but the only method or property returning such an interface is the global $.ui.slider.
How do I access / use the Slider interface for a slider widget I created?
What is the use/purpose of $.ui.slider?