我想为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";