Skip to content

Commit 3381db6

Browse files
authored
fix: Replace EChartsOption/EChartsInstance type (#586)
1 parent b07584b commit 3381db6

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

__tests__/charts/simple-spec.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import React from 'react';
22
import ReactECharts from '../../src/';
3+
import type { EChartsOption } from '../../src/';
34
import { render, destroy, createDiv, removeDom } from '../utils';
45

5-
const options = {
6+
const options: EChartsOption = {
67
xAxis: {
78
type: 'category',
89
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],

src/types.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { CSSProperties } from 'react';
2+
import type { EChartsOption, EChartsType } from 'echarts';
23

3-
export type EChartsOption = any;
4+
export type { EChartsOption };
45

5-
export type EChartsInstance = any;
6+
export type EChartsInstance = EChartsType;
67

78
export type Opts = {
89
readonly devicePixelRatio?: number;

0 commit comments

Comments
 (0)