【发布时间】:2019-02-05 01:21:57
【问题描述】:
我使用 TypeScript 为 React 使用 Kendo UI。我正在尝试使用“typeof import”为 TypeScript 导入 Kendo UI 类型。
按照以下说明进行操作 https://docs.telerik.com/kendo-ui/third-party/typescript 我安装了 kendo-ui 类型:
npm install --save @types/kendo-ui
我加了一行
declare var Grid: typeof import("kendo-ui");
到我的 .tsx 文件。
但是,这给了我错误信息
@types/kendo-ui/index.d.ts is not a module
对于"import("kendo-ui")" 位。
查看 node_modules 目录中的那个文件,这确实没有导入或导出。
如何将 Kendo-UI TypeScript 类型导入到我的 .tsx 模块中?
【问题讨论】:
标签: typescript kendo-ui