Closed
Description
What problem does this feature solve?
Support TypeScript expression in template
What does the proposed API look like?
<template>
<h1>{{ msg }}</h1>
<button @click="(count as number)++">count is: {{ (count as number) + 1 }}</button>
<p>
Edit <code>components/HelloWorld.vue</code> to test hot module replacement.
</p>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue';
export default defineComponent({
name: 'HelloWorld',
setup: (props: { readonly msg: string }) => {
const { msg } = props;
const count = ref(0 as unknown);
return { msg, count };
},
});
</script>