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

TypeScript definition file error in ListViewOptions interface?

2 Answers 66 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 10 Apr 2013, 05:11 AM
Hello,

we have just updated to Kendo Mobile build 2013.1.319 and are using the TypeScript definition file provided by it. We are converting our code from the very minimal definition file we had created up until now.

We have a call to jQuery.kendoMobileListView() that looks like this:
      $("#incident-list").kendoMobileListView({
        template: kendo.template($("#template-incident-list").html()),
        dataSource: this._dsIncidents,
        style: "inset"
      });

The template is defined using the pattern:

    <script id="template-incident-list" type="script/x-kendo-template">
      ...
    </script>

This generates a compiler error because the definition in kendo.mobile.d.ts reads as follows:

    interface ListViewOptions {
       ...
        template?: string;
        ...
    }
    kendoMobileListView(options: kendo.mobile.ui.ListViewOptions): JQuery;

Isn't this an error? Why can't I pass in a Kendo template in the template parameter? 

The code above worked fine on the previous version. I will modify the .d.ts file to see if it still runs on the new version as well.

Thanks,
David Sykes

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 12 Apr 2013, 08:10 AM
Hi David,

The fix is available in the project attached to your other forum thread.

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
David
Top achievements
Rank 1
answered on 15 Apr 2013, 11:47 PM
Thanks, that did fix the error.
Tags
ListView (Mobile)
Asked by
David
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
David
Top achievements
Rank 1
Share this question
or