Open jasonlewis opened 1 year ago
I think defineComponent
have been change so the solutions of the past don't work.
I will see how to fix to types.
We are also running into this issue when trying to build an npm package of our component types (d.ts files). Did you ever make headway on finding a way to fix this? I'm happy to do some digging around on this, but not sure where to start looking. As in, I don't even know what if this is a core vue issue or a language-tools issue.
Same issue here. Is there any workaround to make it work?
I've seen a couple issues for this (#1434, #1261, #703) which all indicate the issue is resolved yet I'm still seeing this problem when using
vue-tsc
to generate the types for a component library.I ran
npm init vue@latest
to test this and created the followingMyButton.vue
component.When running
vue-tsc --declaration --emitDeclarationOnly
I get the following declaration file for the component:For whatever reason when I use this component in a project I don't see the JSDoc and Ctrl + Click takes me through to the line that has
variant: Variant;
.I've also tried declaring props with
withDefaults(defineProps<{}>())
but it yields the same result. As soon as the default is removed and the prop is marked as required the JSDoc comes through correctly.Versions Vue: 3.2.47 Vite: 4.1.1 vue-tsc: 1.1.2
If there's any other information you'd need please let me know. I'm hoping this is just an oversight on my behalf. Cheers.