Skip to content

Commit

Permalink
fix: improve types for option
Browse files Browse the repository at this point in the history
  • Loading branch information
Justineo committed Aug 16, 2023
1 parent f8e7597 commit e224c49
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import {
init,
type SetOptionOpts,
type ECElementEvent,
type ElementEvent
} from "echarts/core";
import { init } from "echarts/core";
import type {
SetOptionOpts,
ECElementEvent,
ElementEvent,
EChartsOption
} from "echarts";
import type { Ref } from "vue";

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

export type LoadingOptions = {
text?: string;
Expand Down

0 comments on commit e224c49

Please sign in to comment.