This is a migrated thread and some comments may be shown as answers.

Kendo UI + TypeScript

15 Answers 808 Views
Integration with other JS libraries
This is a migrated thread and some comments may be shown as answers.
Vikentiy
Top achievements
Rank 1
Vikentiy asked on 03 Oct 2012, 04:44 PM
Hi.
Are you planning to release a set of interfaces for working with Kendo UI with TypeScript?

If you are planning, then when?

15 Answers, 1 is accepted

Sort by
0
Filips
Top achievements
Rank 2
answered on 04 Oct 2012, 12:48 PM

+1 

Would love to see that

0
Dimo
Telerik team
answered on 04 Oct 2012, 01:03 PM
Hello,

TypeScript is something very new and we still have no specific intentions with regard to it. Surely this language will need to prove its value and popularity (or at least its prospects and business value) before we decide to adopt it in any way.

Regards,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Daní
Top achievements
Rank 1
answered on 04 Oct 2012, 04:58 PM
+1
0
mvbaffa
Top achievements
Rank 1
answered on 05 Oct 2012, 05:20 PM
Hi,

I am starting with TypeScript and I could very easily show a kendo Window without having to define a declaration file. Here is the code:
module SiteMaster {
 
    // Class
    export class Config {
 
        // Instance member
        run() {
            var logOnParams = {
                draggable: false, resizable: false, width: "300px", height: "180px",
                title: "LogOn", modal: true, visible: false,
                scrollable: false, actions: []
            };
 
            var logonDlg = $("#logonDialog");
            if(!logonDlg.data("kendoWindow")) {
                (<any>logonDlg).kendoWindow(logOnParams);
                var kendoWindow = logonDlg.data("kendoWindow");
                kendoWindow.center();
                kendoWindow.open();
             }
        }
    }
}

As you can see you have to cast to any to call the kendoWindow so that Visual Studio does not emit an error. Because a jQuery object, logonDlg does not have a method "kendoWindow".

It works Ok. But off course it would be better if Telerik generates for us a declaration file.
0
Dustin
Top achievements
Rank 1
answered on 05 Oct 2012, 07:28 PM
Here is a basic kendo.web.d.ts that I created to support what I need for this small site I have been working on...
interface IKendoTemplate {
}
 
interface IKendo {
    ui: any;
    bind(jqueryObject: any, vm: any);
    observable(obj: any): any;
    data: any;
    //data(widget: string): any;
    template(template: string): IKendoTemplate;
    render(template: IKendoTemplate, data: any): string;
}
 
interface JQuery {
    kendoValidator(opts?: any): IKendo;
    kendoMenu(opts?: any): IKendo;
    kendoDropDownList(opts?: any): IKendo;
}
 
declare var kendo: IKendo;

0
Mike
Top achievements
Rank 1
answered on 07 Oct 2012, 12:57 PM
+1 for Kendo UI + TypeScript
Looks very promising to me... 
0
mvbaffa
Top achievements
Rank 1
answered on 08 Oct 2012, 01:27 PM
Very good. I hope Telerik provides, as soon as they can a d.ts for kendo.
0
Atanas Korchev
Telerik team
answered on 08 Oct 2012, 01:34 PM
Hi,

 Please create a new user voice item in our feedback portal.

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jack
Top achievements
Rank 2
Iron
answered on 01 Nov 2012, 08:53 AM
0
Sebastian
Telerik team
answered on 01 Nov 2012, 11:16 AM
Hi guys,

You can file your vote for TypeScript support in this User Voice item, to affect its priority. There is also a sample solution posted by Jaap Mosselman in the comments which you may ponder in the meantime.

Kind regards,
Sebastian
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Tim
Top achievements
Rank 2
answered on 17 Nov 2012, 05:15 PM
+1 Would be nice to code with kendoui components using typescript in vs2012 - and code the data backend using web API. Coming from c# I've always been hesitant to do anything but light scripting in pure JS.
0
David Thielen
Top achievements
Rank 1
answered on 10 Sep 2013, 04:59 PM
It says this was implemented & delivered in the latest release. Can you tell me where it is? I just downloaed the demo and can't find it. And how to get it set up would be good too.

thanks - dave
0
leniency
Top achievements
Rank 1
answered on 10 Sep 2013, 05:07 PM
David, should be a folder in the base of the zip file named 'typescript'.  Then again, haven't checked the demo download. It might not have it. The full version does though.  The open source kendo.web download has typescript for at least web, not all.
0
David Thielen
Top achievements
Rank 1
answered on 10 Sep 2013, 05:19 PM
Hi;

I found typescript\kenod.all.d.ts in the zip, I assume that is it. Do you guys have any instructions, caveats, etc. about using this? If so, can you provide a link to them?

thanks - dave
0
leniency
Top achievements
Rank 1
answered on 10 Sep 2013, 05:51 PM

Yup, that's it. It's just a definition file, same as the ones you can find on Nuget for jQuery, etc. Same as those, in Visual Studio you can just drag it into another typescript source file to create a reference and have intellisense available. Works same as JavaScript files in VS - creates this commend at the top with relative path to the definition file (*.d.ts are all TypeScript definitions)

/// <reference path="../typings/jquery/jquery.d.ts" />
/// <reference path="../typings/kendo.all.d.ts" />

 

Hopefully, parts are still buggy I've found. Each TypeScript version seems to break something, but fix something else. The Kendo definitions are pretty complete - think there's only been one or two points where I had to change their supplied definition file (forget where, but something declared as a {}, switched to 'any' so TypeScript would allow me to could extend it).

Tags
Integration with other JS libraries
Asked by
Vikentiy
Top achievements
Rank 1
Answers by
Filips
Top achievements
Rank 2
Dimo
Telerik team
Daní
Top achievements
Rank 1
mvbaffa
Top achievements
Rank 1
Dustin
Top achievements
Rank 1
Mike
Top achievements
Rank 1
Atanas Korchev
Telerik team
Jack
Top achievements
Rank 2
Iron
Sebastian
Telerik team
Tim
Top achievements
Rank 2
David Thielen
Top achievements
Rank 1
leniency
Top achievements
Rank 1
Share this question
or