1

Help. I'm new to java script so thought I'd try using TypeScript to make my life a little easier.... but I cannot figure out where to start when trying to create a jquery UI Widget using TypeScript.

I've created UI Widgets in java script before and know that at its most basic I'm aiming for;

$.widget( "nmk.progressbar", {
  _create: function() {
    var progress = this.options.value + "%";
    this.element.addClass("progressbar").text( progress );
  }
});

(From the jQuery UI Widget Factory tutorial)

Is it even possible to create a jquery UI Widget using TypeScript?

Any help would be greatly appreciated!

1
  • 1
    try if this helps..I know its not exactly answering your question but it worth taking a look..typescriptlang.org/Samples/#Warship Commented Nov 30, 2012 at 16:11

1 Answer 1

1

You should just need to reference the jqueryui.d.ts file from DefinitelyTyped to get type information.

Sign up to request clarification or add additional context in comments.

1 Comment

Of course! (Doh!) I'd got it into my head that I needed to "export class". I've been following DefinitelyTyped for a while. (Sammy, require, etc)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.