echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Feature] 不能将类型“EChartsType”分配给类型“ECharts”。 类型具有私有属性“_ssr”的单独声明。ts-plugin(2322)

Open whr2349 opened this issue 1 year ago • 2 comments

What problem does this feature solve?

不想看到这个错误提示,一个大红线

What does the proposed API look like?

import { EChartsType } from 'echarts/core'; let myChart : EChartsType | null = null; myChart = echarts.init(echartRef.value) mychart下面飘着大红线非常讨厌,init返回的也是EChartsType类型的对象啊,为啥‘’不能将类型“EChartsType”分配给类型“ECharts”。 类型具有私有属性“_ssr”的单独声明。ts-plugin(2322)‘’ 这么讨厌的票着的大红?

whr2349 avatar Oct 11 '24 02:10 whr2349

@whr2349 Please provide a demo for the issue either with Official Editor, CodePen, CodeSandbox or JSFiddle.

echarts-bot[bot] avatar Oct 11 '24 04:10 echarts-bot[bot]

按需引入 import { EChartsType } from 'echarts/core'; import * as echarts from "echarts/core"; 全部导入 import { EChartsType } from 'echarts'; import * as echarts from "echarts";

这样就不报错了

LudanArch avatar Dec 16 '24 08:12 LudanArch