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

Cannot use interface to declare emits #8457

Closed
so1ve opened this issue May 30, 2023 · 2 comments · Fixed by #12343
Closed

Cannot use interface to declare emits #8457

so1ve opened this issue May 30, 2023 · 2 comments · Fixed by #12343

Comments

@so1ve
Copy link
Member

so1ve commented May 30, 2023

Vue version

3.3.4

Link to minimal reproduction

vuejs/language-tools#3223

Steps to reproduce

See the example

What is expected?

No type errors

What is actually happening?

Type errors

System Info

No response

Any additional comments?

Well that's a typescript limitation: microsoft/TypeScript#42825 but I think we can avoid it.

@vaban-ru
Copy link

image
Same issue here

@so1ve
Copy link
Member Author

so1ve commented Sep 2, 2023

Ugh. After some thoughts, I think the error is correct, see the example:

interface Emits {
  foo: []
}
interface Emits {
  bar: 1 // !!!!
}

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

Successfully merging a pull request may close this issue.

3 participants