From e224c49951d148d3b0dc300e2b5640a7ea7d1540 Mon Sep 17 00:00:00 2001 From: Justineo Date: Wed, 16 Aug 2023 14:31:23 +0800 Subject: [PATCH] fix: improve types for option --- src/types.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/types.ts b/src/types.ts index f373172..ade785b 100644 --- a/src/types.ts +++ b/src/types.ts @@ -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 | null | Ref | { value: T | null }; @@ -22,8 +23,7 @@ export type UpdateOptionsInjection = Injection; export type EChartsType = ReturnType; type ZRenderType = ReturnType; export type EventTarget = EChartsType | ZRenderType; -type SetOptionType = EChartsType["setOption"]; -export type Option = Parameters[0]; +export type Option = EChartsOption; export type LoadingOptions = { text?: string;