fix: resolve type reference in props annotation
π€ What is the nature of this change?
- [ ] New feature
- [x] Fix bug
- [ ] Style optimization
- [ ] Code style optimization
- [ ] Performance optimization
- [ ] Build optimization
- [ ] Refactor code or style
- [ ] Test related
- [ ] Other
π Related Issue
π‘ Background or solution
When the resolveType option is enabled in vue-jsx, props types cannot be inferred.
Reproduction linkοΌhttps://stackblitz.com/edit/vitejs-vite-hjex3faa?file=src%2FApp.tsx
π Changelog
| Language | Changelog |
|---|---|
| πΊπΈ English | resolve type reference in props annotation |
| π¨π³ Chinese | δΈΊ props ε’ε εΌη¨η±»εε£°ζθ§£ζ |
βοΈ Self Check before Merge
β οΈ Please check all items below before review. β οΈ
- [x] Doc is updated/provided or not needed
- [x] Demo is updated/provided or not needed
- [x] TypeScript definition is updated/provided or not needed
- [x] Changelog is provided or not needed
Deploy Preview for vue-jsx-explorer failed. Why did it fail? β
| Name | Link |
|---|---|
| Latest commit | 1c0863f4609476ea82b3e509f68a074ee1c50d57 |
| Latest deploy log | https://app.netlify.com/projects/vue-jsx-explorer/deploys/6914254e18eed90008a5fd46 |
The strange thing is that the playground cannot reproduce the error in the StackBlitz link. I apologize that I don't have time to investigate this further.
If you later discover differences between them, please let me know.
https://vue-jsx-explorer.netlify.app/#import%20%7B%20defineComponent%20%7D%20from%20'vue'%0A%0Ainterface%20MyProps%20%7B%0A%20%20age%3A%20number%0A%7D%0A%0Aconst%20App%20%3D%20defineComponent((props%3A%20MyProps)%20%3D%3E%20%3Cdiv%3EHello%20World%3C%2Fdiv%3E)