@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
This commit is contained in:
loopArray
2017-09-26 00:04:59 +08:00
committed by Masahiro Wakame
parent 1cbfd46ddf
commit e835076e1e

View File

@@ -3,7 +3,7 @@
// Definitions by: Xie Jingyang <https://github.com/xieisabug>, AntiMoron <https://github.com/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;
}