Skip to content

Commit 54ac383

Browse files
committed
refactor(types): use SetOptionOpts from echarts
1 parent 7aa9edc commit 54ac383

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/types.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
2-
import { init } from "echarts/core";
2+
import { init, SetOptionOpts } from "echarts/core";
33
import { Ref } from "vue";
44

55
type InitType = typeof init;
@@ -13,15 +13,7 @@ export type EChartsType = ReturnType<InitType>;
1313
type SetOptionType = EChartsType["setOption"];
1414
export type Option = Parameters<SetOptionType>[0];
1515

16-
// TODO: Wait for apache/echarts#14289 to ship in v5.1,
17-
// so that we can use SetOptionOpts directly
18-
export interface UpdateOptions {
19-
notMerge?: boolean;
20-
lazyUpdate?: boolean;
21-
silent?: boolean;
22-
replaceMerge?: any;
23-
transition?: any;
24-
}
16+
export type UpdateOptions = Omit<SetOptionOpts, "notMerge">;
2517
export type UpdateOptionsInjection =
2618
| UpdateOptions
2719
| null

0 commit comments

Comments
 (0)