Skip to content

Commit 2a0db56

Browse files
committed
types: fix option type (#751)
1 parent 2b30334 commit 2a0db56

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/types.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
import { init } from "echarts/core";
2-
import type {
3-
SetOptionOpts,
4-
ECElementEvent,
5-
ElementEvent,
6-
EChartsOption
7-
} from "echarts";
2+
import type { SetOptionOpts, ECElementEvent, ElementEvent } from "echarts";
83
import type { Ref } from "vue";
94

105
export type Injection<T> = T | null | Ref<T | null> | { value: T | null };
@@ -23,7 +18,9 @@ export type UpdateOptionsInjection = Injection<UpdateOptions>;
2318
export type EChartsType = ReturnType<InitType>;
2419
type ZRenderType = ReturnType<EChartsType["getZr"]>;
2520
export type EventTarget = EChartsType | ZRenderType;
26-
export type Option = EChartsOption;
21+
22+
type SetOptionType = EChartsType["setOption"];
23+
export type Option = Parameters<SetOptionType>[0];
2724

2825
export type LoadingOptions = {
2926
text?: string;

0 commit comments

Comments
 (0)