Skip to content

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

@scitech

Description

@scitech

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions