echarts
echarts copied to clipboard
[Bug] Missed type property for Typescript on EChartsOption
Version
5.5.1
Link to Minimal Reproduction
https://codesandbox.io/p/sandbox/fervent-euclid-kkws7t?file=%2Fsrc%2Findex.ts%3A3%2C23
Steps to Reproduce
- Use base example
- Use property
option.xAxis.datain option: EChartsOption with Typescript
Current Behavior
I have error for use property data in option: EChartsOption
Property 'data' does not exist on type 'XAXisOption | XAXisOption[]'.
Expected Behavior
Types for EChartsOption correct with all options.
I encountered the same problem,and can import EChartsOption like this
import type * as echarts from 'echarts'
export type EChartsOption = echarts.EChartsOption
I got it working with this skill.