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

Private name Props error with TypeScript. #2201

Open
bencodezen opened this issue Feb 1, 2023 · 5 comments
Open

Private name Props error with TypeScript. #2201

bencodezen opened this issue Feb 1, 2023 · 5 comments

Comments

@bencodezen
Copy link
Member

The following is a reproduction of the description from #2200. Credit goes fully to @olfek for reporting this issue.

Existing code snippet gives this error:

Default export of the module has or is using private name 'Props'.ts (4082)

Error fixed thanks to:
vuejs/language-tools#1232 (comment)

image

@skirtles-code
Copy link
Contributor

I'm currently investigating this. I'll report back in the next few days.

For anyone needing a temporary fix, the simplest way to make the warning go away is to export the interface.

@skirtles-code
Copy link
Contributor

Discussion thread for adding support for this to Volar: vuejs/language-tools#2421.

@ishowman
Copy link

I'm currently investigating this. I'll report back in the next few days.

For anyone needing a temporary fix, the simplest way to make the warning go away is to export the interface.

but the example code of docs currently is:
https://vuejs.org/guide/typescript/composition-api.html#typing-component-props

which is the correct usage??

@Ge6ben
Copy link

Ge6ben commented Jun 4, 2023

Hi , Same Here !
I notice that when I delete the variable that bind in slots of template the error will disappear!

@wal0x
Copy link

wal0x commented Jul 29, 2023

I have the same issue but when trying to generate types with vue-tsc --declaration --emitDeclarationOnly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants