vuejs / language-tools

⚡ High-performance Vue language tooling based-on Volar.js
https://marketplace.visualstudio.com/items?itemName=Vue.volar
MIT License
5.87k stars 403 forks source link

split `strictTemplate` into two distinct options for props and component import #4879

Open victorgarciaesgi opened 1 month ago

victorgarciaesgi commented 1 month ago

What problem does this feature solve?

First, thanks again for your amazing work on vue-tsc, nothing is greater than to be type safe in a Vue environnement. In our codebase we want to gradually make component imports safer, and currently an undeclared Component is marked as unknown. Activating strictTemplates: true resolve this, but also activates the strict prop typechecking, which we currently can't handle in our codebase. We are then currently blocked on this subject as we would like to gradually upgrade a safer props types but will be too much work for now.

What does the proposed solution look like?

The solution could be to split the strictTemplate into two options, or to add a two new ones strictProps and strictComponentImports, to cherry pick which one we want.