The ui parameter that is returned to the caller in jQueryUI menu events (e.g. select) has an optional property named item, but it was not included in this type file.
The menu widget definition does not allow a MenuEvents object to be passed to it during initialization. For example, this gives an error from TypeScript:
$el.menu({select: (e, ui) => { }});
I modified the MenuOptions definition to extend MenuEvents and removed MenuEvents from the Menu interface definition. This makes it consistent with how the other widgets are defined and allows both options and events to be defined when creating a menu widget.
Refactored jQuery UI datepicker overloads and added JSDoc. Options still
to do - will follow in a later commit I hope. Removed unused
optionLiteral datepicker overloads (undocumented). Made the following
change to the underlying methodName overload to allow other overloads to
"chain" into it.
```
datepicker(methodName: string, ...otherParams: any[]): any;
```
Moved datepicker tests to single function. Added tests for datepicker
methods.
Very much just first steps. A lot to do in jQuery UI I think...
If we look into jqueryUI internals we will see that all the config values stored in one object. Both Options and Events. For example we can call UI.sortable({opacity: value1, start: fn1, stop: fn2})
The interface of the property `$.ui.keyCode` uses a non-standard name `keyCode` which clashes with the property name, giving error `Type reference cannot refer to a property`.
Changing the interface name from `keyCode` to `KeyCode` follows the interface naming convention and resolves this issue.
From jquery docs: "If Selector is specified as the type of an argument, it accepts everything that the jQuery constructor accepts, eg. Strings, Elements, Lists of Elements."
http://api.jquery.com/Types/#Selector
Compiling with TS 0.9.1.1 the compiler stopped with "error TS2154: Specialized overload signature is not subtype of any non-specialized signature."
As a matter of fact the non-specialized signature for the slider(methodName, values) overload was missing.
Adding it everything was fine.