【问题标题】:Properties missing in TypeScript when strongly typing variable to kendo.mobile.Applicaiton向 kendo.mobile.Application 强输入变量时,TypeScript 中缺少属性
【发布时间】:2014-05-15 23:48:44
【问题描述】:

我正在使用剑道手机和打字稿。缺少窗格属性。我的参考设置正确,因为其他属性按预期显示,而不是窗格属性(以及其他一些属性)。

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) {
....
}

【问题讨论】:

    标签: typescript kendo-mobile


    【解决方案1】:

    您可以在本地更新定义并在将来向他们发送 PR:

    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) {
    ....
    }
    

    【讨论】:

      猜你喜欢
      • 2015-12-02
      • 2019-02-07
      • 1970-01-01
      • 2019-10-15
      • 2017-11-10
      • 1970-01-01
      • 2021-06-24
      • 1970-01-01
      • 2020-11-21
      相关资源
      最近更新 更多