我想为 Highcharts 模块 Boost 使用 TypeScript 定义
定义存在于:
// Type definitions for Highcharts 4.2.6 (boost module)
// Project: http://www.highcharts.com/
// Definitions by: Daniel Martin <http://github.com/inad9300>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { Static } from "highcharts";
declare function HighchartsBoost(H: Static): Static;
export = HighchartsBoost;
export as namespace HighchartsBoost;
当我尝试将它们导入为以下任何一种时:
import { HighchartsBoost } from "highcharts/modules/boost";
import * as HighchartsBoost from "highcharts/modules/boost";
我收到错误:模块解析为非模块实体,无法使用此构造导入。
有什么想法吗?
最佳答案
你应该使用:import HighchartsBoost from "highcharts/modules/boost";
关于javascript - Highcharts TypeScript Boost 模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45338224/