Using Typescript with Telerik's Kendo UI, I am at a bit of an impasse when it comes to how to properly define objects with a type of a widget.
For instance, if I want to declare a kendoEditor, I normally do the following...
var elements = {
description: {}
};
elements.description = $('#description').kendoEditor({
// options
}).data("kendoEditor");
elements.description.refresh(); // this is a function of kendo editor.
This works fine in normal javascript, but in typescript I am told that elements.description is not a type of kendo.ui.Editor. So I try to do it that way ...
var elements = { description: kendo.ui.Editor = null };
elements.description = $('#description').kendoEditor({ // options }).data("kendoEditor");
This works fine in the compiler, but at run time it says that it cannot assign it to null. But if I do not put = null, then it will not compile.
Can anyone express to me the correct way to do this? Additionally, any does not seem to be accepted either.