提交 198ccdb4 编写于 作者: 1 100pah

ts: tweak lint

上级 e25f1dcb
......@@ -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);
......
......@@ -219,9 +219,9 @@ class GraphSeriesModel extends SeriesModel<GraphSeriesOption> {
/**
* Preserved points during layouting
*/
preservedPoints?: Dictionary<VectorArray>
preservedPoints?: Dictionary<VectorArray>;
forceLayout?: ForceLayoutInstance
forceLayout?: ForceLayoutInstance;
init(option: GraphSeriesOption) {
super.init.apply(this, arguments as any);
......
......@@ -313,7 +313,7 @@ class SunburstPiece extends graphic.Group {
}
label.attr('rotation', rotate);
type LabelOption = SunburstSeriesNodeOption['label']
type LabelOption = SunburstSeriesNodeOption['label'];
function getLabelAttr<T extends keyof LabelOption>(name: T): LabelOption[T] {
var stateAttr = labelModel.get(name);
if (stateAttr == null) {
......
......@@ -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<TreemapSeriesNodeItemOption>
type NodeModel = Model<TreemapSeriesNodeItemOption>;
type NodeItemStyleModel = Model<TreemapSeriesNodeItemOption['itemStyle']>;
const ITEM_STYLE_NORMAL = 'itemStyle';
......
......@@ -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<CommonAxisPointerOption>
type AxisPointerModel = Model<CommonAxisPointerOption>;
class SingleAxisPointer extends BaseAxisPointer {
......
......@@ -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,
......
......@@ -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) {
......
......@@ -58,7 +58,7 @@ interface PayloadBatch {
dataZoomId: string
}
type Store = Dictionary<Record>
type Store = Dictionary<Record>;
const inner = makeInner<Store, ExtensionAPI>();
......
......@@ -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'
......
......@@ -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<ScrollableLegendOption> {
static type = 'legend.scroll' as const
type = ScrollableLegendModel.type
static type = 'legend.scroll' as const;
type = ScrollableLegendModel.type;
/**
* @param {number} scrollDataIndex
......
......@@ -64,7 +64,7 @@ interface ToolboxDataZoomFeatureOption extends ToolboxFeatureOption {
yAxisIndex?: ModelFinderIndexQuery | false
}
type ToolboxDataZoomFeatureModel = ToolboxFeatureModel<ToolboxDataZoomFeatureOption>
type ToolboxDataZoomFeatureModel = ToolboxFeatureModel<ToolboxDataZoomFeatureOption>;
class DataZoomFeature extends ToolboxFeature<ToolboxDataZoomFeatureOption> {
......
......@@ -108,7 +108,7 @@ class SaveAsImage extends ToolboxFeature<ToolboxSaveAsImageFeatureOption> {
excludeComponents: ['toolbox'],
pixelRatio: 1,
lang: saveAsImageLang.lang.slice()
}
};
}
SaveAsImage.prototype.unusable = !env.canvasSupported;
......
......@@ -60,7 +60,7 @@ type ShapeStorage = {
indicator: graphic.Polygon
indicatorLabel: graphic.Text
indicatorLabelPoint: number[]
}
};
type TargetDataIndices = ReturnType<ContinuousModel['findTargetDataIndices']>;
......
......@@ -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);
}
......
......@@ -654,7 +654,7 @@ class GlobalModel extends Model<ECUnitOption> {
ecModel.mergeOption(baseOption);
};
})()
})();
}
// -----------------------
......
......@@ -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);
}
......
......@@ -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<any>) => void
type SymbolShapeMaker = (x: number, y: number, w: number, h: number, shape: Dictionary<any>) => void;
/**
* Triangle shape
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册