添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
谦虚好学的烤地瓜  ·  Forwarding React Refs ...·  12 小时前    · 
温暖的金鱼  ·  Typescript + React ...·  12 小时前    · 
近视的苦瓜  ·  [TypeScript] REST ...·  12 小时前    · 
豪情万千的芹菜  ·  Mastering React ...·  12 小时前    · 
闯红灯的台灯  ·  野原广志_百度百科·  5 月前    · 
坏坏的李子  ·  Gitlab Runner no ...·  8 月前    · 

Hello,

I have the following code that works fine in javascript.

kendo.drawing.drawDOM($(".content-wrapper"))

but when I switched over to Typescript, I get the following error.

Argument of type 'JQuery' is not assignable to parameter of type 'HTMLElement'

HTMLElement is defined in ..\typescript\kendo.all.d.ts as

interface HTMLElement {
kendoBindingTarget: kendo.data.BindingTarget;

BindingTarget is defined as

class BindingTarget {
target: any;
options: any;
source: any;

How do I convert the following code to typescript?

kendo.drawing.drawDOM($(".content-wrapper"))

Hello Xavier,

It looks like an issue in the TypeScript definitions of Kendo UI. It will be fixed with the next internal build, that should be released by the end of the week.

Thanks for reporting this.

Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!

I also find it odd that categoryAxis and ValueAxis is defined as array.

interface ChartOptions {

valueAxis?: ChartValueAxisItem[];

categoryAxis?: ChartCategoryAxisItem[];

so I have to use it as

categoryAxis: [
baseUnit: "fit",
maxDateGroups: 30
valueAxis: [
{ max : 10, min: 0  }

I don't understand why these are an array?

Hello Xavier,

It has been like this since the first releases of the Chart, so we cannot change it now, as it will be a breaking change. However it is the same for both TypeScript and the standard JavaScript.

Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!