Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type errors when defining prop interfaces when "declaration" is true in tsconfig.json #12940

Closed
scitech opened this issue Feb 24, 2025 · 1 comment

Comments

@scitech
Copy link

scitech commented Feb 24, 2025

Vue version

3.5.13

Link to minimal reproduction

https://play.vuejs.org/#eNp9UcFqAjEQ/ZWQSyvIithe7FZoi4cKVakeAyXE2TU2m4Qka5Vl/72TLFqF4i3z3svMmzcNfbE229dAxzT3wkkbiIdQW6K4Lp8ZDZ5RUoIGJwWWa0YnTMvKGhdIQzZQSA1LZ6wnLSmcqcgdNrtjGkU6gCu4APJxXFkQkqtO2DBNiOYVjIkPTuryKQJhi68xWWPRMn3ROL/+PrnvoSQfdGbRDBYBKqt4AKwIybfDSdOkAaRt8wGWCbYOIj5bLeZZN1cWx/s0tpeEURA7X3SjfQxAGF3IMtt5ozGl5J5RYSorFbiFDdJoDGnc7RU5rpT5mSUsuBr6J1xsQXz/g+/8IWKMLh14cHtg9MwF7koIHT1dzeGA7zNZmU2tUH2D/ARvVB09drLXWm/Q9oUuuX1PF8Uo1n56CKD9aakroxsQijt+6ha5SLVJwChe/u1GLH+rjLKH9A9PjQl/7cHFeRjuKHvMhiPa/gJ39N4I

Steps to reproduce

  1. In tsconfig.json, set "declaration": true
  2. Write an SFC with a script setup block and an attribute naming a generic, like generic="T"
  3. Write a props interface using the generic and pass it to the type parameter in defineProps
  4. Observe a type error saying "Default export of the module has or is using private name"

What is expected?

This should not trigger a type error, which is how it works when no generic attribute is provided.

What is actually happening?

There is a type error saying "Default export of the module has or is using private name"

System Info

Any additional comments?

No response

@edison1105 edison1105 added scope: types language-tools related to vue language-tools labels Feb 25, 2025
@edison1105
Copy link
Member

see vuejs/language-tools#1232 (comment)

@edison1105 edison1105 removed the language-tools related to vue language-tools label Feb 25, 2025
@edison1105 edison1105 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants