From e835076e1e059a87fbbfa9fb918cae30cb596688 Mon Sep 17 00:00:00 2001 From: loopArray <525029662@qq.com> Date: Tue, 26 Sep 2017 00:04:59 +0800 Subject: [PATCH] @types/echarts Modify namespaces from ECharts to echarts (#19507) * Modify namespaces from ECharts to echarts Modify namespaces from ECharts to echarts. Because the global variables in the window browser using echarts rather than ECharts. If I don't use UMD or AMD or commonjs way to use echarts, ECharts compiled in the browser can not find. * ECharts is only a type not a constructed function --- types/echarts/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/echarts/index.d.ts b/types/echarts/index.d.ts index 4261a7e848..bcae4299d3 100644 --- a/types/echarts/index.d.ts +++ b/types/echarts/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Xie Jingyang , AntiMoron // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare namespace ECharts { +declare namespace echarts { function init(dom:HTMLDivElement|HTMLCanvasElement, theme?:Object|string, opts?:{ devicePixelRatio?: number renderer?: string @@ -26,7 +26,7 @@ declare namespace ECharts { function registerTheme(themeName:string, theme:Object):void; - class ECharts { + interface ECharts { group:string; setOption(option:EChartOption, notMerge?:boolean, notRefreshImmediately?:boolean):void @@ -178,5 +178,5 @@ declare namespace ECharts { } declare module "echarts" { - export = ECharts; + export = echarts; }