Skip to content

Commit e224c49

Browse files
committed
fix: improve types for option
1 parent f8e7597 commit e224c49

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/types.ts

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

910
export type Injection<T> = T | null | Ref<T | null> | { value: T | null };
@@ -22,8 +23,7 @@ export type UpdateOptionsInjection = Injection<UpdateOptions>;
2223
export type EChartsType = ReturnType<InitType>;
2324
type ZRenderType = ReturnType<EChartsType["getZr"]>;
2425
export type EventTarget = EChartsType | ZRenderType;
25-
type SetOptionType = EChartsType["setOption"];
26-
export type Option = Parameters<SetOptionType>[0];
26+
export type Option = EChartsOption;
2727

2828
export type LoadingOptions = {
2929
text?: string;

0 commit comments

Comments
 (0)