Skip to content

Commit 3bc32c0

Browse files
committed
fix #145: methods are now required props in VueApexCharts component
1 parent 404772f commit 3bc32c0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

typings/vue-apexcharts.d.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import ApexCharts, { ApexOptions } from "apexcharts";
22
import { DefineComponent, Plugin } from "vue";
33

4-
export interface VueApexChartsComponent {
4+
export interface VueApexChartsComponentProps {
55
// data
66
readonly chart?: ApexCharts;
77
// props
@@ -24,7 +24,9 @@ export interface VueApexChartsComponent {
2424
series: any;
2525
width?: string | number;
2626
height?: string | number;
27-
// method
27+
}
28+
29+
export interface VueApexChartsComponentMethods {
2830
init(): Promise<void>;
2931
refresh(): Promise<void>;
3032
destroy(): void;
@@ -52,7 +54,7 @@ export interface VueApexChartsComponent {
5254
dataURI(options?: { scale?: number; width?: number }): Promise<void>;
5355
}
5456

55-
type VueApexChartsComponentType = DefineComponent<VueApexChartsComponent>;
57+
type VueApexChartsComponentType = DefineComponent<VueApexChartsComponentProps, VueApexChartsComponentMethods>;
5658

5759
declare const VueApexCharts: VueApexChartsComponentType & Plugin;
5860

0 commit comments

Comments
 (0)