Added Typescript declaration file for the Draggabilly library.#109
Added Typescript declaration file for the Draggabilly library.#109giespaepen wants to merge 1 commit intodesandro:masterfrom
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 |
|
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.
Shouldn't options be an optional parameter?
|
I found the types lib for this |
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!