diff --git a/src/chart/bar/BarView.ts b/src/chart/bar/BarView.ts index 9ef7ce3df5929efae6f167026f2a32bacd98fe13..4fee71c2fb29db763e8bd2f999abbff8e99b3204 100644 --- a/src/chart/bar/BarView.ts +++ b/src/chart/bar/BarView.ts @@ -81,16 +81,16 @@ function getClipArea(coord: CoordSysOfBar, data: List) { class BarView extends ChartView { - static type = 'bar' as const - type = BarView.type + static type = 'bar' as const; + type = BarView.type; - _data: List + _data: List; - _isLargeDraw: boolean + _isLargeDraw: boolean; - _backgroundGroup: Group + _backgroundGroup: Group; - _backgroundEls: (Rect | Sector)[] + _backgroundEls: (Rect | Sector)[]; render(seriesModel: BarSeriesModel, ecModel: GlobalModel, api: ExtensionAPI) { this._updateDrawMode(seriesModel); diff --git a/src/chart/graph/GraphSeries.ts b/src/chart/graph/GraphSeries.ts index 5c5e152856c28d2152b305126f60b1405541128f..e2366e9a4c1c2b6d6ef95cc6562212e57270f229 100644 --- a/src/chart/graph/GraphSeries.ts +++ b/src/chart/graph/GraphSeries.ts @@ -219,9 +219,9 @@ class GraphSeriesModel extends SeriesModel { /** * Preserved points during layouting */ - preservedPoints?: Dictionary + preservedPoints?: Dictionary; - forceLayout?: ForceLayoutInstance + forceLayout?: ForceLayoutInstance; init(option: GraphSeriesOption) { super.init.apply(this, arguments as any); diff --git a/src/chart/sunburst/SunburstPiece.ts b/src/chart/sunburst/SunburstPiece.ts index 2017514ab64548de4be739f51325fa4db59526d0..2e7b3d17f3077c25300f4074d69a1cdc0417fc90 100644 --- a/src/chart/sunburst/SunburstPiece.ts +++ b/src/chart/sunburst/SunburstPiece.ts @@ -313,7 +313,7 @@ class SunburstPiece extends graphic.Group { } label.attr('rotation', rotate); - type LabelOption = SunburstSeriesNodeOption['label'] + type LabelOption = SunburstSeriesNodeOption['label']; function getLabelAttr(name: T): LabelOption[T] { var stateAttr = labelModel.get(name); if (stateAttr == null) { diff --git a/src/chart/treemap/treemapVisual.ts b/src/chart/treemap/treemapVisual.ts index 20f9bb88fda1c0249cdfeca877fc796c11978a5a..88c009a5daf9be9bf67d35bb6480ead08dfe3fec 100644 --- a/src/chart/treemap/treemapVisual.ts +++ b/src/chart/treemap/treemapVisual.ts @@ -26,7 +26,7 @@ import { ColorString, ZRColor } from '../../util/types'; import { modifyHSL, modifyAlpha } from 'zrender/src/tool/color'; import { makeInner } from '../../util/model'; -type NodeModel = Model +type NodeModel = Model; type NodeItemStyleModel = Model; const ITEM_STYLE_NORMAL = 'itemStyle'; diff --git a/src/component/axisPointer/SingleAxisPointer.ts b/src/component/axisPointer/SingleAxisPointer.ts index 2037823cf0cac1bb65e046aea655d48094631bc8..b3b5a791114fec6cd815b8f27d84f38f5223c650 100644 --- a/src/component/axisPointer/SingleAxisPointer.ts +++ b/src/component/axisPointer/SingleAxisPointer.ts @@ -34,7 +34,7 @@ const XY = ['x', 'y'] as const; const WH = ['width', 'height'] as const; // Not use top level axisPointer model -type AxisPointerModel = Model +type AxisPointerModel = Model; class SingleAxisPointer extends BaseAxisPointer { diff --git a/src/component/axisPointer/axisTrigger.ts b/src/component/axisPointer/axisTrigger.ts index ef03e9c9c54fa8c24af205dced6b3e12b548daf4..f41117e68eb4917a2f891e3ec29be258f11d03e0 100644 --- a/src/component/axisPointer/axisTrigger.ts +++ b/src/component/axisPointer/axisTrigger.ts @@ -100,7 +100,7 @@ interface AxisTriggerPayload extends Payload { type ShowValueMap = Dictionary<{ value: AxisValue payloadBatch: BatchItem[] -}> +}>; /** * Basic logic: check all axis, if they do not demand show/highlight, diff --git a/src/component/calendar/CalendarView.ts b/src/component/calendar/CalendarView.ts index e3a76392d275bd81bd1a7419591e5b01bda1980d..c153b388240928b5b5aa2d6ed6353cc0add29fa0 100644 --- a/src/component/calendar/CalendarView.ts +++ b/src/component/calendar/CalendarView.ts @@ -67,12 +67,12 @@ class CalendarView extends ComponentView { /** * first day of month */ - private _firstDayOfMonth: CalendarParsedDateInfo[] + private _firstDayOfMonth: CalendarParsedDateInfo[]; /** * first day point of month */ - private _firstDayPoints: number[][] + private _firstDayPoints: number[][]; render(calendarModel: CalendarModel, ecModel: GlobalModel, api: ExtensionAPI) { diff --git a/src/component/dataZoom/roams.ts b/src/component/dataZoom/roams.ts index d8d1948b497e50bf2bb86761f560a88cdfa89409..417aaadffee5502c1aa0472a0b6f500c3a6bfb18 100644 --- a/src/component/dataZoom/roams.ts +++ b/src/component/dataZoom/roams.ts @@ -58,7 +58,7 @@ interface PayloadBatch { dataZoomId: string } -type Store = Dictionary +type Store = Dictionary; const inner = makeInner(); diff --git a/src/component/helper/RoamController.ts b/src/component/helper/RoamController.ts index 33f840d2db84f377c63591467d7270f53da87490..3ff8a7cb7b5469297a9a82c4a540b4f8fa42d1e9 100644 --- a/src/component/helper/RoamController.ts +++ b/src/component/helper/RoamController.ts @@ -27,7 +27,7 @@ import Group from 'zrender/src/container/Group'; // Can be null/undefined or true/false // or 'pan/move' or 'zoom'/'scale' -export type RoamType = RoamOptionMixin['roam'] +export type RoamType = RoamOptionMixin['roam']; interface RoamOption { zoomOnMouseWheel?: boolean | 'ctrl' | 'shift' | 'alt' diff --git a/src/component/legend/ScrollableLegendModel.ts b/src/component/legend/ScrollableLegendModel.ts index 51a5313ccbbfb405b99392447cc96f97a7c76d06..b9ed1d2a57ea23a28964357393938683312ce152 100644 --- a/src/component/legend/ScrollableLegendModel.ts +++ b/src/component/legend/ScrollableLegendModel.ts @@ -26,7 +26,6 @@ import { ZRColor, LabelOption } from '../../util/types'; import Model from '../../model/Model'; import ComponentModel from '../../model/Component'; import GlobalModel from '../../model/Global'; -import * as zrUtil from 'zrender/src/core/util'; import { inheritDefaultOption } from '../../util/component'; export interface ScrollableLegendOption extends LegendOption { @@ -56,8 +55,8 @@ export interface ScrollableLegendOption extends LegendOption { class ScrollableLegendModel extends LegendModel { - static type = 'legend.scroll' as const - type = ScrollableLegendModel.type + static type = 'legend.scroll' as const; + type = ScrollableLegendModel.type; /** * @param {number} scrollDataIndex diff --git a/src/component/toolbox/feature/DataZoom.ts b/src/component/toolbox/feature/DataZoom.ts index 43cf5283999d943cbfe0693e3dd19a445cdfabb4..e2b9ef0b4f4076283c8e037c9c93fea4f047fbce 100644 --- a/src/component/toolbox/feature/DataZoom.ts +++ b/src/component/toolbox/feature/DataZoom.ts @@ -64,7 +64,7 @@ interface ToolboxDataZoomFeatureOption extends ToolboxFeatureOption { yAxisIndex?: ModelFinderIndexQuery | false } -type ToolboxDataZoomFeatureModel = ToolboxFeatureModel +type ToolboxDataZoomFeatureModel = ToolboxFeatureModel; class DataZoomFeature extends ToolboxFeature { diff --git a/src/component/toolbox/feature/SaveAsImage.ts b/src/component/toolbox/feature/SaveAsImage.ts index d57b299c778dd4eabe8c3dac4f19163f5f8a326c..cef219f5dc3ddd777cb0b0447208210f35967738 100644 --- a/src/component/toolbox/feature/SaveAsImage.ts +++ b/src/component/toolbox/feature/SaveAsImage.ts @@ -108,7 +108,7 @@ class SaveAsImage extends ToolboxFeature { excludeComponents: ['toolbox'], pixelRatio: 1, lang: saveAsImageLang.lang.slice() - } + }; } SaveAsImage.prototype.unusable = !env.canvasSupported; diff --git a/src/component/visualMap/ContinuousView.ts b/src/component/visualMap/ContinuousView.ts index dab55d7269a2fd077c12e050f43ca8ebadee48fa..555c08408a4dd522676afbfe605ec4386c35cb63 100644 --- a/src/component/visualMap/ContinuousView.ts +++ b/src/component/visualMap/ContinuousView.ts @@ -60,7 +60,7 @@ type ShapeStorage = { indicator: graphic.Polygon indicatorLabel: graphic.Text indicatorLabelPoint: number[] -} +}; type TargetDataIndices = ReturnType; diff --git a/src/data/Graph.ts b/src/data/Graph.ts index ca6ce181ffd2d694ec3feb95abd53bc8ed7e55b5..39aec7146f6b48f2a8d0f0c2475e0bd10bbd87a1 100644 --- a/src/data/Graph.ts +++ b/src/data/Graph.ts @@ -307,10 +307,10 @@ class Graph { var graph = new Graph(this._directed); var nodes = this.nodes; var edges = this.edges; - for (var i = 0; i < nodes.length; i++) { + for (let i = 0; i < nodes.length; i++) { graph.addNode(nodes[i].id, nodes[i].dataIndex); } - for (var i = 0; i < edges.length; i++) { + for (let i = 0; i < edges.length; i++) { var e = edges[i]; graph.addEdge(e.node1.id, e.node2.id, e.dataIndex); } diff --git a/src/model/Global.ts b/src/model/Global.ts index 0cb8c62be8e7f604b584a3a390a66f520280d306..4a61f1f99671ccd8125c98265f355e38a33dc877 100644 --- a/src/model/Global.ts +++ b/src/model/Global.ts @@ -654,7 +654,7 @@ class GlobalModel extends Model { ecModel.mergeOption(baseOption); }; - })() + })(); } // ----------------------- diff --git a/src/stream/Scheduler.ts b/src/stream/Scheduler.ts index a99988e6664dbd8c9bf614da163b60791c7cca24..05f3dabdcf09a9b72b551850c40b9e483a749940 100644 --- a/src/stream/Scheduler.ts +++ b/src/stream/Scheduler.ts @@ -131,8 +131,8 @@ class Scheduler { // processors might be registered after echarts instance created. // Register processors incrementally for a echarts instance is // not supported by this stream architecture. - var dataProcessorHandlers = this._dataProcessorHandlers = dataProcessorHandlers.slice(); - var visualHandlers = this._visualHandlers = visualHandlers.slice(); + dataProcessorHandlers = this._dataProcessorHandlers = dataProcessorHandlers.slice(); + visualHandlers = this._visualHandlers = visualHandlers.slice(); this._allHandlers = dataProcessorHandlers.concat(visualHandlers); } diff --git a/src/util/symbol.ts b/src/util/symbol.ts index 2a7121aaa237ab8a64eaf77f24a067037dafc833..f9f0c85f4195e8952beec4c4455f0bb96a0e211a 100644 --- a/src/util/symbol.ts +++ b/src/util/symbol.ts @@ -31,7 +31,7 @@ type ECSymbol = graphic.Path & { setColor: (color: ZRColor, innerColor?: string) => void }; type SymbolCtor = { new(): ECSymbol }; -type SymbolShapeMaker = (x: number, y: number, w: number, h: number, shape: Dictionary) => void +type SymbolShapeMaker = (x: number, y: number, w: number, h: number, shape: Dictionary) => void; /** * Triangle shape