Javascript 使用ou.d.ts从typescript文件调用Js lib

Javascript 使用ou.d.ts从typescript文件调用Js lib,javascript,typescript,Javascript,Typescript,我想使用一个javascript库,它在我的typescript projet中提供控件,但在typescript或.d.ts中对此库没有定义。 可能吗 因此,让我纠正一下,我想使用devexpress库仪表板查看器 但是在devexpress组的typescript.d.ts中,没有计划使用此功能的控件 DevExpress.Dashboard.ResourceManager.embedBundledResources(); // Creates a new Web Dashboard co

我想使用一个javascript库,它在我的typescript projet中提供控件,但在typescript或.d.ts中对此库没有定义。 可能吗

因此,让我纠正一下,我想使用devexpress库仪表板查看器

但是在devexpress组的typescript.d.ts中,没有计划使用此功能的控件

DevExpress.Dashboard.ResourceManager.embedBundledResources();
// Creates a new Web Dashboard control with the specified ID and settings:
var dashboardControl = new DevExpress.Dashboard.DashboardControl(document.getElementById("container"), {
    // Configures an URL where the Web Dashboard's server-side is hosted:
    endpoint: "https://demos.devexpress.com/services/dashboard/api",
    workingMode: "Viewer",
    extensions: {
        "dashboard-panel": (control) => new DevExpress.Dashboard.DashboardPanelExtension(control)
    }
});
我想在我的typescript文件中使用它,所以即使javascript加载到我的html文件中,也无法识别它

Thx提前,
Razgort

我通过运行命令
npm I@types/knockout

修复了它。我的问题是什么?低质量的问题:没有代码,没有错误消息,没有自己研究工作的迹象。我编辑问题是为了提供更多信息。对不起,您是否尝试将现有的
typescript.d.ts
复制到您的项目中,因此,重写模块中的API,并自己添加缺少的API?如何添加缺少的控件?我从来没有做过任何typescript.d.tsa建议-将
@types
安装为
--保存开发人员。或开发依赖项。在运行时通常不需要它