vue icon indicating copy to clipboard operation
vue copied to clipboard

[2.7.10] [typescript] Cannot change the typing of $emit since 2.7.5

Open vidal7 opened this issue 2 years ago • 1 comments

Version

2.7.10

Reproduction link

github.com

Steps to reproduce

  • Clone the repo
  • npm install
  • npm run compile

What is expected?

No typescript compilation errors

What is actually happening?

There is typescript compilation errors


Since 2.7.5 and https://github.com/vuejs/vue/commit/005e52d0b6f1a5bf9679789c5c4b90afd442d86b, $emit cannot be typed with vue-class-component.

If you checkout commit 62000a803bbe4ed1dc9d30c20772a948cab49d16 and doing npm install to go back in vue 2.7.4 and npm run compile, everything is fine.

See file src/ComponentWithTypedEvents.ts to see examples about working typing of events.

vidal7 avatar Aug 31 '22 13:08 vidal7

BTW, still not working in [email protected]

vidal7 avatar Sep 20 '22 14:09 vidal7