I'm facing an issue where TypeScript works in the script but is disabled in the template. How can I resolve this?
<template>
<div>
<div><input type="text" v-model="text"></div> <!-- nothing -->
<button @click="text = 'why'">click</button> <!-- nothing -->
<div>{{text}}</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue'
const text = ref(0)
text.value = '' // Type 'string' is not assignable to type 'number'
</script>