import { ForwardedRef, MutableRefObject } from 'react'; import { ECharts } from 'echarts'; import type ReactEcharts from 'echarts-for-react'; export default function useEchartsRef(ref: ForwardedRef | ((ref: ReactEcharts | null) => ECharts)): { ref: MutableRefObject; getInstance: () => ECharts; };