Calling JavaScript directly from TypeScript

前端 未结 4 930
Happy的楠姐
Happy的楠姐 2020-12-06 16:21

I have just downloaded the TypeScript documentation. I have a some JavaScript classes and I would like to create and use these class in a TypeScript test application

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-06 16:54

    There is a better solution. Just cast the jQuery logonDlg to any like this:

    (logonDlg).kendoWindow(logOnParams);
    

    The code will be a bit different but will work the same.

    1. Without the cast th generated code is like this: logonDlg.kendoWindow(logOnParams);
    2. With the cast will be like this: (logonDlg).kendoWindow(logOnParams);

    Both work OK.

    Regards

提交回复
热议问题