Closed igbominadeveloper closed 3 years ago
When vue support typescript in template(https://github.com/vuejs/vue-next/issues/1359), you can fix it by this ($event.target as any).checked
.
But for now you need to use a helper function:
<template>
...
@change="emitModelValue"
...
</template>
<script lang="ts">
...
function emitModelValue(event: Event) {
emit('update:modelVolar', (event.target as any).checked);
}
...
</script>
You can ask TS question in Vue Discord next time, you will have more immediate response.
I created a reusable component with this template
When I run vue-tsc, I get these errors:
To be honest, I am not sure this is a vue-tsc problem, I just don't know where to turn to. Any help is welcome