language-tools
language-tools copied to clipboard
Declaration files d.ts not generated for generic component
Vue - Official extension or vue-tsc version
2.0.26
VSCode version
Vue version
3.4.21
TypeScript version
5.4 and 5.5.3
System Info
No response
Steps to reproduce
- Go to this example repo https://stackblitz.com/edit/vite-ungnsb?file=package.json,src%2Fcomponents%2FTableRow.vue,src%2Ftypes.ts,tsconfig.dist.json,src%2Fcomponents%2FTableRowCell.vue,src%2Fcomponents%2FEmptyTableRow.vue
- in terminal run
vue-tsc -p tsconfig.dist.json
- Check
dist
folder
What is expected?
I would expect that dist
folder contains components/EmptyTableRow.vue.d.ts
and components/TableRow.vue.d.ts
files.
What is actually happening?
For some reason the declaration files are not emitted for these components. But interesingly the AppTableRowCell
is also a generic component which look quite similar to AppTableRow
and the declaration file is emitted correctly for it. When I either remove defineProps()
from EmptyTableRow.vue
or remove the generic="..."
the declaration file is then emitted. It is quite strange, because no error is being emitted from the command itself, it's just that the files are not there.
Link to minimal reproduction
https://stackblitz.com/edit/vite-ungnsb?file=package.json,src%2Fcomponents%2FTableRow.vue,src%2Ftypes.ts,tsconfig.dist.json,src%2Fcomponents%2FTableRowCell.vue,src%2Fcomponents%2FEmptyTableRow.vue
Any additional comments?
No response