<script setup lang="ts"> ts无法验证
Version
3.2.19
Steps to reproduce
<script setup lang="ts">
type test = { name: string; age: number }
let aa: test = {
name: 'a',
age: 12
}
aa.bbb = 'c'
console.log(aa)
</script>
What is expected?
应该 Property 'bbb' does not exist on type 'test'. 61 | age: 12 62 | }
63 | aa.bbb = 'c' | ^^^
What is actually happening?
编译成功,没有报错
Hi, thanks for your interest but Github issues are for bug reports and feature requests only. You can ask questions on the forum, the Discord server or StackOverflow.
This is likely to be a configuration issue on your project or maybe you are looking for https://github.com/johnsoncodehk/vue-tsc