From 2a0db561b410e0ab98eb3a72fdb4c8b51a72d42b Mon Sep 17 00:00:00 2001 From: Justineo Date: Mon, 18 Dec 2023 10:22:08 +0800 Subject: [PATCH] types: fix option type (#751) --- src/types.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/types.ts b/src/types.ts index ade785b..a53eb56 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,10 +1,5 @@ import { init } from "echarts/core"; -import type { - SetOptionOpts, - ECElementEvent, - ElementEvent, - EChartsOption -} from "echarts"; +import type { SetOptionOpts, ECElementEvent, ElementEvent } from "echarts"; import type { Ref } from "vue"; export type Injection = T | null | Ref | { value: T | null }; @@ -23,7 +18,9 @@ export type UpdateOptionsInjection = Injection; export type EChartsType = ReturnType; type ZRenderType = ReturnType; export type EventTarget = EChartsType | ZRenderType; -export type Option = EChartsOption; + +type SetOptionType = EChartsType["setOption"]; +export type Option = Parameters[0]; export type LoadingOptions = { text?: string;