Closed tsaiian closed 4 months ago
<script setup lang="ts"> ...<skip>... function zoomed(chartContext, { xaxis, yaxis }) { // do something... } </script> <template> <apexchart ref="chart" type="bar" :options="chartOptions" :series="series" @zoomed="zoomed"> </apexchart> </template>
The above code generates the following error when executing vue-tsc --noEmit:
vue-tsc --noEmit
error TS2322: Type '(chartContext: any, { xaxis, yaxis }: { xaxis: any; yaxis: any; }) => void' is not assignable to type 'never'.
It looks like the type definition for the zoomed event is wrong
zoomed
this error come from wrong defineProps syntax.
defineProps
not vue3-apexcharts issue, sorry.
vue3-apexcharts
The above code generates the following error when executing
vue-tsc --noEmit
:It looks like the type definition for the
zoomed
event is wrong