-
Notifications
You must be signed in to change notification settings - Fork 386
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
Added Typescript declaration file for the Draggabilly library. #109
base: master
Are you sure you want to change the base?
Conversation
Thanks for this contribution. I don't have any experience with Typescript and Angular 2, so I'd like to wait and see if others are interested in adding this before I merge it in. Add a 👍 reaction to this PR if you'd like to see this feature added to Draggabilly. |
+1 |
4 similar comments
+1 |
+1 |
+1 |
+1 |
Totally a +1! |
+1 |
2 similar comments
+1 |
+1 |
Not sure this declaration file works if you don't have JQuery though? It's referencing a JQuery directory which I don't have in my typings directory. Not sure what the best solution is as I'm just learning TypeScript. |
Chrismacp makes a good point. I don't see why the jQuery reference at the top needs to be there anyway. It should work just fine without it. What about adding this as a DefinitelyTyped entry while we wait to see if it gets accepted? I imagine most people who want jQuery typings are going to be pulling them from DefinitelyTyped anyway, right? |
Sorry @desandro, forgot this PR completely. Still valid if I add some typings. Not that much effort nowadays. |
* Interface for the main object | ||
*/ | ||
interface Draggabilly { | ||
new (element: any, options: Draggabilly.IDraggabillyOptions); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't options
be an optional parameter?
Great library and I just needed dragging in a webproject without the need of the large jQueryUI library. Since I develop with Angular/Typescript it came in handy to create a declaration file. Feel free to merge it!