Is it possible to and can anyone give me an example of using Typescript to write a jQuery plugin. I feel like the plugin structure would be much more maintainable and readable if plugins were written as classes, but I can't find any examples of that online. My idea is basically as follows, but I don't know if it will work.
class Modalify{
constructor(public options: Object) {}
public doSomething() {
console.log(this.options);
}
}
$.fn.modalify = Modalify;
edit this is not a duplicate because I am specifically looking for the es2015 way of doing this. The possible duplicate is using regular javascript and just trying to add typing support