Properties missing in TypeScript when strongly typing variable to kendo.mobile.Applicaiton

StackOverflow https://stackoverflow.com/questions/23690523

  •  29-07-2023
  •  | 
  •  

Вопрос

I'm using kendo mobile and typescript. The pane property is missing. I have my references setup correctly as other properties display as expected just not the pane property (and a few others).

var _app : kendo.mobile.Application = new kendo.mobile.Application();;

//then I try to do this but pane shows the red squiggly saying does not exist
if (_app.pane) {
....
}
Это было полезно?

Решение

You can update the definitions locally and send them a PR at a future point:

declare module kendo{
   export module mobile{
       interface Application{
            pane:any;
       }
   }
}

var _app : kendo.mobile.Application = new kendo.mobile.Application();;

// should be okay now 
if (_app.pane) {
....
}
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top