关于使用 compiler-sfc 编译 script setup ts 文件的问题
Version
3.2.6
Reproduction link
https://gitee.com/ckang1229/vue-next-script-setup-issuse
Steps to reproduce
yarn node build.js
What is expected?
props的type属性是可选的,导致生成dts文件时报错
What is actually happening?
将withDefaults.vue编译成withDefaults.ts后,props的type属性的类型应该不是可选的
Use withDefaults to define attributes in script setup, and the type inference is incorrect after compile-sfc is compiled into ts file.
in sfc file in ts file
I think it should not contain optional flags
Here is a reproducible demo with readme.md attached。please check @ygj6