提交 1d09ccde 编写于 作者: P pissang

fix(type): fix type errors

上级 9f41ab71
......@@ -204,7 +204,7 @@ class MarkAreaView extends MarkerView {
updateTransform(markAreaModel: MarkAreaModel, ecModel: GlobalModel, api: ExtensionAPI) {
ecModel.eachSeries(function (seriesModel) {
const maModel = MarkerModel.getMarkerModelFromSeries(seriesModel, 'markArea');
const maModel = MarkerModel.getMarkerModelFromSeries(seriesModel, 'markArea') as MarkAreaModel;
if (maModel) {
const areaData = maModel.getData();
areaData.each(function (idx) {
......
......@@ -906,12 +906,14 @@ class TooltipView extends ComponentView {
}
type TooltipableOption = {
tooltip?: TooltipOption | string
tooltip?: Omit<TooltipOption, 'mainType'> | string
};
/**
* From top to bottom. (the last one should be globalTooltipModel);
*/
function buildTooltipModel(modelCascade: (TooltipModel | Model<TooltipableOption> | TooltipOption | string)[]) {
function buildTooltipModel(modelCascade: (
TooltipModel | Model<TooltipableOption> | Omit<TooltipOption, 'mainType'> | string
)[]) {
// Last is always tooltip model.
let resultModel = modelCascade.pop() as Model<TooltipOption>;
while (modelCascade.length) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册