Subscribe on changes!

Cannot use interface to declare emits

avatar
May 30th 2023

Vue version

3.3.4

Link to minimal reproduction

https://github.com/vuejs/language-tools/issues/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.

avatar
Jul 25th 2023

image Same issue here

avatar
Sep 2nd 2023

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

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