-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JQuery UI definitions file problems, and in general lack of test for definitions files #21
Comments
The tests, usually taken from the official docs work very very well. |
I have a problem with e.g. Tabs interface : $("#temp").tabs({activate:1}); gives me an error : supplied parameters do not match any signature events should be marked with a question mark. I don't think methods belong on the interface... or am I missing something ? |
I added the needed method definitions and took the options to a separate interface. |
This still needs improvement. Events like activate should go on the option interface, because they can be specified (and they most likely are) when creating the widget (from the viewpoint of someone using the widget). $("#temp").tabs({activate:function(event,ui) { alert("a tab is activated"); }); should be possible. They should also be marked with a question mark, as events are in most cases optional. I don't know if events are needed on the specific widget interface, maybe someone who wants to subclass a specific widget? Maybe they are not needed at all |
I noticed some problems in your JQueryUI defintion, especialy the way you declare events. They should not be a method, but a property function.
For example in the Widget interface :
create(event: Event, ui): void;
should be in fact
create:(event: Event, ui)=> void;
Plus a lot of properties should be marked as optional etc.
In general we should find a way yo automate tests on lib files so we can be sure they perfectly match the true library, because at the moment i'm pretty sure none of the files presents in this repository are exacts.
The text was updated successfully, but these errors were encountered: